AnsweredAssumed Answered

Macro to change dimension in this configuration only

Question asked by Christian Mills on Feb 11, 2021
Latest reply on Feb 11, 2021 by Artem Taturevych

The below code is part of a lager macro but I am trying to modify D1 in the "Extended" configuration only but the below code changes the dimension for all of the configurations.

How would I change it to this configuration only?

 

Dim ConfigMgr As ConfigurationManager
Dim Model As ModelDoc2
Dim C1a As Configuration
Dim SelMgr As SelectionMgr
Set Model = swApp.ActiveDoc
Set SelMgr = Model.SelectionManager
Set ConfigMgr = Model.ConfigurationManager
ConfigMgr.AddConfiguration "Extended", "", fileName1, 1, "", "no description"
ConfigMgr.AddConfiguration "Closed", "", fileName1, 1, "", "no description"
Model.ShowConfiguration2 ("Extended")

boolstatus = Part.Extension.SelectByID2("D1@Distance1@" & fileName1 & ".SLDASM", "DIMENSION", 0, 0, 0, True, 0, Nothing, 0)
Dim myDimension As Object
Set myDimension = Part.Parameter("D1@Distance1")
myDimension.SystemValue (strokeLength)

Part.ClearSelection2 True

Outcomes