ScriptSpot

Forum topic · General Scripting

AEC Extended Railing data drive selection of Path

By TomNChris · 2018-05-13

Description

Hi I am relatively new to MXS. I am seeking to data drive the creation of fences/handrails based on splines created from a textfile. I have worked out how I can (a) create the splines (b) create the railing however there is no MXS property for AEC Extended Railing picking of the spline/path for the railing.
I have done a bit of research and suggestion is to understand the UI code name for that pick button under the railing function but I cannot find the name of it or how it would work.
Has anyone got some tips or pointers that could assist me please, there doesn't seem to be much information on the topic.
Thanks

Comments (3)

.

jahman · 2018-05-15

Railing path isn't exposed to maxscript, so the only way to set it is to use UI & WinApi.
It's a pretty complex task for beginner.

1. select railing
2. change to modify mode
3. find window handle of "Pick Railing Path" button
4. press this button to enable path picking mode
5. find a screen coord of any knot of your Path spline node. (it has to be visible in viewport)
6. click at this point to emulate user picking

RE hwd viewer

TomNChris · 2018-05-17

Thanks Pixamoon, I will give that a go. It looked like what I was seeking.