We are using 2011.
I created a VBA tool that populates the FX Userparameters with a Thickness Variable
How do I set the Sheet Metal Rules Thickness to the new new FX UserParameter Thickness Variable?
for example:
The Userparamter variable name is "cab_thk"
Under Sheet Metal Defaults | Sheet Metal Rules | Sheet (Tab)
The Thickness entry should read "cab_thk"
Thanks,
not sure if this is what you want
sName = oDoc.ComponentDefinition.ActiveSheetMetalStyle.name
i recommend you use iLogic, create a new rule and add the code as below
=============================
Dim oPartDoc As PartDocument
' you need add Set before the next line in VBA
oPartDoc = ThisApplication.ActiveDocument
' you need add Set before the next line in VBA
Dim oSheetMetalCompDef As SheetMetalComponentDefinition
oSheetMetalCompDef = oPartDoc.ComponentDefinition
' "oThick" is the user parameter name in user parameters
oSheetMetalCompDef.SheetMetalStyles.Item("Default").Thickness = oThick
=============================
iLogic can be change the value automatically when you parameter change, and VBA need to run after you change value.
of course, you can convert the code above to VBA code easily, just change the oThick to the user parameter statement and make some adjustment.
Let me know if it works
Thanks
Mick
Well it worked.
The API documentation was a little unclear on this topic. There are too many objects with a Thickness property.
Some I guess are read only. In my mind those should have been named GetThickness.
Thank you for the support.