Instant recalculation cm to feet to inches?


#1

Is there a way to instantly switch between dimensions and only show them (no recalculation) Thank you!


(Jeremy) #2

Use Select Dimensions and the Dim properties panel appears. You can change the (annotation) Style and all dims will change. You will probably need to add an Annotation Style to the document first (in a drawing based on a metric template you only get metric styles by default).


#3

I was noodling around a bit with the dimstyles, can someone with more insight tell me why the last line does not give the wanted effect?

import rhinoscriptsyntax as rs
import Rhino

allObjs = rs.AllObjects()
    
for obj in allObjs:
    if rs.ObjectType(obj) == 512:
        rhObj = rs.coercerhinoobject(obj)
        rhObj.DimensionStyle.DimensionLengthDisplay = Rhino.DocObjects.DimensionStyle.LengthDisplay.FeetAndInches

(Pascal Golay) #4

Hello - you may want a CommitChanges() on the dimension style - but please start a new thread on the Scriting forum for that.
https://discourse.mcneel.com/c/scripting

-Pascal


#5

Well, it is in direct response to the OPs question about an instant switch between dimension units, so I don’t see why it would not fit in here. OP could then just use a new toolbar button to switch to inches and back.


(Jeremy) #6

Hi @rgr ,

I think Pascal is simply making the point that if you want help with scripting you will get a better response if you bring your request to the attention of people with an interest in scripting…

Most people can’t keep up with all the posts that appear in Discourse, so we tend to filter on topics.

Regards
Jeremy


#7

@jeremy5 this is what I"m looking for @rgr totally interested getting your script to quickly fire an alias or have a button set to toggle dimensions.

Thank you all for your help on this.

Hannes


(Jeremy) #8

Hi Hannes,

Are you aware that you can display two different dimension units simultaneously? If you turn on Alternate Units for your dims you get a second unit of your choice in square brackets after the first, e.g.:
25.4 [1]

Regards
Jeremy


#9

@jeremy5 whoop :fire: this is a game changer.