How to change the general units

Schlagworte:
  • 2014

Hi,

Only when we start to create a smartpart, the firsts options let to choose the general untis. When a smartpart is totally created and ended, is possible to change the general units?

Thanks!
Xavi

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Hi Xavi,

this is not possible, because it makes not sense!
Why? Imagine, you have wrote tons of code like this:

BOX 0.1,0.2,0.3
ARC 0,0,90,90
HANDLEFACTOR 0.5
FOR i=1 TO 20
...
NEXT i

Then you Change the length unit from "m" to "mm"!
This change the MEANING of several numbers (the bold ones) in the script.
Now 0.1 mean no longer 0.1 m -> it's now 0.1 mm !
It would be a horrible thing to change all numbers in the script to fit the new unit!

However, you can do this with resetting the smt, and overtake all (see Change_dimension.png)

... but it's a good idea to decide the unit before start of Scripting :-)

Regards.

Jörg

Anhänge (1)

Typ: image/png
672-mal heruntergeladen
Größe: 97,25 KiB

Hi Xavi,

if the user should be able to change the unit, f.e. m to mm, you could think about scripting the unit-change in the SmartPart.
Maybe a checkbox in the pallett and a factor to handle the change (factor = 1000).
Just an idea. For some objects it could be enough.

Best regards,
Martin Philipp

Thanks for the answers Jörg and Martin!

Jörg, I'm agree with you, this is only way that I found to convert units from a smartpart ended. For the new smartparts, I will follow your tip :-)

Mmmmm... Martin, I try to create some chek box for the interface to convert smartpart to several units, and It's really useful. But is only recomendable for some kind of smartparts, with short code.. Thanks for your tip!

Regards,
Xavi

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/