iLogic code to toggle "edit dimension when created"

iLogic code to toggle "edit dimension when created"

DeepshipEngineering
Enthusiast Enthusiast
231 Views
3 Replies
Message 1 of 4

iLogic code to toggle "edit dimension when created"

DeepshipEngineering
Enthusiast
Enthusiast

See attached video.  I have created macros to change the drawing standard for different decimal places and dual units but I would like to add another macro to toggle the check box, "edit dimension when created", ideally a see through command I can run whilst in the dimension command

 

TIA

 

0 Likes
232 Views
3 Replies
Replies (3)
Message 2 of 4

Michael.Navara
Advisor
Advisor

You are looking for this setting in DrawingOptions

 

'Store current setting
Dim editDimension = ThisApplication.DrawingOptions.EditDimensionWhenCreated

'Disable edit
ThisApplication.DrawingOptions.EditDimensionWhenCreated = False

'Do something. In this case I just call standard command for dimension
ThisApplication.CommandManager.ControlDefinitions("DrawingGeneralDimensionCmd").Execute2(true)

'Set previous value back
ThisApplication.DrawingOptions.EditDimensionWhenCreated = editDimension
0 Likes
Message 3 of 4

DeepshipEngineering
Enthusiast
Enthusiast

Thanks for the reply.  Lines 1 to 5 work great for tuning edit dimension when created off.  Would there be a way of checking if its on or off and using the rule to toggle it to the opposite? I know there would be no feedback on the macro button to tell you which state was active but think we could live with that

0 Likes
Message 4 of 4

Michael.Navara
Advisor
Advisor

You want just so switch the value?

You can use this

ThisApplication.DrawingOptions.EditDimensionWhenCreated = Not ThisApplication.DrawingOptions.EditDimensionWhenCreated
0 Likes