Wednesday, November 29, 2023
Home3D ModelingThe best way to work together with default attributes in Dynamic Parts...

The best way to work together with default attributes in Dynamic Parts with Ruby – Ruby API


Hello, guys!

I created a element with its definition and occasion in Ruby. Is it doable so as to add choice lists with Ruby to the element similar to creating Dynamic Parts to regulate one thing like measurement?

I attempted this code:

      # Convert the group to a element and set its identify and attributes
      inst = group.to_component
      inst.definition.identify = "materials"
      inst.identify = thickness.to_s
      
      # Set the thickness attribute to the element's LenY
      inst.set_attribute("dynamic_attributes", "LenY", thickness)

however it gave me solely “LenY” that may be a Customized Attribute
dasda

I do know “LenY” here’s a string. So is there a strategy to work together with the native or default attributes in DC or create a customized one related with the native attributes (This might be higher as a result of we will customise the identify showing within the DC choices.

Thanks prematurely!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments