change helical curve height using iLogic

change helical curve height using iLogic

Nathan.r12345
Contributor Contributor
246 Views
1 Reply
Message 1 of 2

change helical curve height using iLogic

Nathan.r12345
Contributor
Contributor

Hey guys, 

New to iLogic..

I am building a curved staircase and i am having trouble finding a way to change the height of one of the barriers/balustrades on the stair using a rule .

 

Basically to make a barrier/balustrade for the stair, i use two helical curves, one above the other and loft between them and thicken it.

 

I want to be able to have an option on a form which changes the height of one of the helical curves only. ie the bottom one.

 

I tired opening iLogic and tried 'capture current state' of the helical curve that want to alter but it dosent give me any options. is there another way using a rule to make the hieght change on just one of the curves?

 

So if you look at my image. the the height is currently TREADRISE. I have another hieght which is FCL and i want to be able to switch that one bottom curve only between TREADRISE and FCL.

0 Likes
247 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Hi @Nathan.r12345.  Is "TREADRISE" the name of a UserParameter (located within the group called User Parameters within the Parameters dialog box)?  If so, then is "FCL" also the name of a User Parameter?  When I look closely at the image you attached, I see that term appears to currently be set as the value of many different Model Parameters. because I see things like the following

"fx:d177 = TREADRISE"

"fx:d157 = TREADRISE"

"fx:d327 = TREADRISE"

"fx:d140 = TREADRISE"

"fx:d342 = TREADRISE"

"fx:d153 = TREADRISE"

In those cases, "fx" means there is an equation driving a parameter's value.

Also in those cases, "d177", d157", "d327", "d140", "d342", "d153" are the names of the Model Parameters whose values are being set with an equation, and the equation is simply that the value is equal to the value of that specific named User Parameter.

So, we would need to know which ModelParameter represents the one controlling the height of that helical curve, so that we can change its equation from "TREADRISE" to "FCL".  One way to figure this out is to have that dialog shown in your image open, then click within the value box for the Height dimension, then hover you mouse perfectly still over that value box, then there will usually be a small pop-up show which includes the name of the Parameters involved.  That will tell you the name of the Model Parameter that you will need to change the value of, either manually, or by code.

 

If attempting to completely control these things by code, without knowing the names of the Model Parameters involved, then the code may get pretty complicated, because you will need to find all of these things by code, without seeing them, because you will be looking at a code screen.  You would first need to get into the part's component definition.  Then find that specific Sketch3D object, one way or another.  Then access its HelicalCurves collection, and find that one specific HelicalCurve object that you want to edit.  Then, you must access its Definition (HelicalCurveDefinition is just the 'base' type, and not specific), but you need to know which more specific type of definition it is (HelicalCurveConstantShapeDefinition or HelicalCurveVariableShapeDefinition), before you can access its properties correctly.  Then, if it is the 'constant' variation, you can access its HelicalCurveConstantShapeDefinition.Height property, which is Read/Write, but does not tell you what type of value has (Variant type can be many different data types or object types).  I suspect that its value type will be something like a Parameter, or one of its more specific derived types, like ModelParameterUserParameter, or others).

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes