Hello i am new to macros and i have a big need for macro which could set driven dimension for part extrusion height. could anyone help me?
Set swFeat = Part.FeatureByName("Boss-Extrude1")
Set swExtrudeFeatData = swFeat.GetDefinition
swExtrudeFeatData.SetDepth True, 0.5
swFeat.ModifyDefinition swExtrudeFeatData, Part, Nothing
boolstatus = Part.Save3(swSaveAsOptions_Silent, lErrors, lWarnings)
above example set Extrude value to 0.5*1000 = 500
Thanks, But I need driven dimension which could display extrusion height. I do not need to change extrusion height itself.
You can use DrivenState Property of Dimension
Dimension.DrivenState = 1
1 = Dimension is a driven dimension
2 = Dimension is a driving dimension
Retrieving data ...