Toggle Dimmensions?
-
So, what's the toggle expression? And, would the dims be subject to edit whether visible or not?
-
model.rendering_options['DisplayDims'] = true
model.rendering_options['DisplayDims'] = false
model.rendering_options['DisplayDims'] = !model.rendering_options['DisplayDims']
@mitcorb said:
And, would the dims be subject to edit whether visible or not?
How would you edit them when they are not visible?
-
There are several boolean 'display' settings in the model.rendering_options
"DisplayColorByLayer"
"DisplayDims"
"DisplayFog"
"DisplayInstanceAxes"
"DisplaySketchAxes"
"DisplayText"
"DisplayWatermarks"
"HideConstructionGeometry" Some like "Axes", "ConstructionGeometry" and "Fog" are in available the 'View' menu, some are 'Model Info' Settings ["InstanceAxes"], whilst others are in the menu but inaccessible through the API [like "SectionPlane"]... -
@tig said:
@thomthom said:
Found this:
Sketchup.active_model.rendering_options['DisplayDims']
It allows you to toggle the display of dimensions - is that available in the UI?
Some like "Axes", "ConstructionGeometry" and "Fog" are in available the 'View' menu ...
Although the menu reads "Guides" which I constantly forgot to look for...
-
"How would you edit them when they are not visible?"
Inadvertently. I guess I was asking if this was any way related to layer visibility or the way layer visibility does not guarantee non editable? -
@mitcorb said:
"How would you edit them when they are not visible?"
Inadvertently. I guess I was asking if this was any way related to layer visibility or the way layer visibility does not guarantee non editable?I did some testing. It's just the visibility. If a dimension is locked to the vertices of an edge it will adjust to the length of the edge regardless of this setting.
Though I still haven't found this setting in the UI. If a script set this to false then a user would not be able to turn it on unless they knew the API. And even suspected the API could do this...
-
And more... once hidden this way, the "Select all dimensions" button, on the "Dimensions" panel, of the "Model Info" dialog will not select ANY dimensions.
Any dimensions in the selection set, will be removed if this display option option is set false by a script.
So mitcorb, no you can NOT edit them by accident when they are hidden (singly or globally.)
-
Thanks ThomThom and Dan. If I don't ask, I don't learn.
-
@dan rathbun said:
So mitcorb, no you can NOT edit them by accident when they are hidden (singly or globally.)
All though they still update.
-
@thomthom said:
@dan rathbun said:
So mitcorb, no you can NOT edit them by accident when they are hidden (singly or globally.)
All though they still update.
Yes.. if associative and their anchor points are moved or changed.
I'm not sure about styling fonts, etc. I suppose you can still access them via an entities collection... and I wonder if you could FORCE them into the selection set without crashing the application.
Advertisement