Dimension text
-
Hi !
Access to "dimensions" entities informations via scripts seems really hard in Sketchup ...

How can you access to the dimension text ? Modify it ? Start point of the dimension ? end point ? Line weight ? Arrow ? etc...
Is it a block ? A group ? Can't explode it...Please Help me !!!

Thank you ! -
Currently you can't insert or edit dimension entities or their settings with Ruby.
A script work-around is to insert a component [skp file] that is simply a dimension drawn from the origin say 1 unit long in the x (red), with the text-style/arrow-style preset as required, your script then inserts it at picked-point 1, and then the script rotates/scales it in its length etc to suit picked-point 2 etc. The dimension shown updates accordingly.
.
-
@unknownuser said:
Currently you can't insert or edit dimension entities or their settings with Ruby.

Grmbl... Is it a v7 upgrade???@unknownuser said:
A script work-around is to insert a component [skp file] that is simply a dimension drawn from the origin say 1 unit long in the x (red), with the text-style/arrow-style preset as required, your script then inserts it at picked-point 1, and then the script rotates/scales it in its length etc to suit picked-point 2 etc. The dimension shown updates accordingly.
Thanks for the method !
I want to make a script that erase all units in texts... Verz easy in lisp language, but not in ruby....Thank you TIG !
-
@matt666 said:
I want to make a script that erase all units in texts...
Why not just uncheck the box in Window>Model Info>Units?
-

Thank you ! I also wanted to make a script that removed unnecessary zeros (if the dimension result is an integer...)
225.00 => 225
225.20 => 225.2
225.25 => 225.25
But I think now it's not possible.
Thank you Dave ! -
I no little of Ruby but you are probably right. Dropping the zeroes as needed may not be possible. Perhaps that should be a wish list item for the next version of SU.
Cheers,
Dave
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better ๐
Register LoginAdvertisement