[Plugin] Add Height from Datum

Re: [Plugin] Add Height from Datum

Postby TIG » Wed Nov 08, 2017 1:53 pm

You can easily edit the script [for your own in-house use]
Use Notepad++ on PC or TextWrangler on a MAC, to open its main RB file in the Plugins folder named:
#heighttool_datum.rb
We are going to remove the "Height: " prefix from all tags...

Find line #74 - to stop an initial prefix - which reads:
txt="Height: #{z}"
Edit it to read:
txt="#{z}"

Find line #103 - to trap for updated datums affecting tags - which reads:
e.set_text("Height: "+(e.point.z+@datum).to_l.to_s)
Edit it to read:
e.set_text((e.point.z+@datum).to_l.to_s)
Repeat the edit for the equivalent text in line #109...

Find line #127 - to correct the text changes in the observer's action - which reads:
t.set_text("Height: "+(t.point.z+datum).to_l.to_s)
Edit it to read:
t.set_text((t.point.z+datum).to_l.to_s)

Save the changes to the file and then start up SketchUp to see the effect...
1
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Add Height from Datum

Postby srx » Wed Nov 08, 2017 5:58 pm

Is it possible to wrap this datum in a component representing symbol for high in the floor plan? Similar to attributes in Autocad?
2
www.saurus.rs
User avatar
srx 
 

Re: [Plugin] Add Height from Datum

Postby pbacot » Sat Dec 09, 2017 4:15 am

Use the tool quite a lot in site models. When I set height above datum, however the leader is not nice and long like the ones in the video. It is short and level so is almost always obscured by the object being referenced. I move the text afteward.

Anyway really useful tool! Thanks!
1
MacOSX (El Capitan) ShetchUp Pro v16 Layout Twilight Pro v2 M2 Kerkythea PowerCADD
User avatar
pbacot 
Top SketchUcator
 

Re: [Plugin] Add Height from Datum

Postby rv1974 » Sat Dec 09, 2017 7:04 am

TIG Some humble requests here (I'd happy to see them as commercial ones):
*) A second alternative datum line
It's very common to use to datum systems: one is above the sea level, second- project's one simultaneously.
*) Even though the file units in are centimeters the level values come in meters.
*) Slope indication tool, especially as percent value?
*) Is Interactive update a doable thing?
0

rv1974 
 

Re: [Plugin] Add Height from Datum

Postby JClements » Thu Dec 14, 2017 8:22 am

Hi TIG:

When using SU2018 there seems to be a glitch. The starting point of the leader for the elevation label is no longer "sticky" (if the surface or end-point to which leader is pointing is pushpulled or moved, the leader doesn't move with it).

However, when "Make Selected Text Dynamic" is applied to a regular leader text, the leader of the converted text IS "sticky".

Regards, John
0
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: [Plugin] Add Height from Datum

Postby TIG » Thu Dec 14, 2017 2:12 pm

It has never been possible to 'attach' a text arrowhead using API code [it can be done with a dim].
The manual attachment can't be copied.

However, you can manually attach these pieces of text yourself.
Add the tag.
Activate the Text tool, select the tag's arrowhead and with the mouse button kept down drag the arrowhead and lock it onto the desired face or edge, if you select the text-part you can also relocate that...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Add Height from Datum

Postby JClements » Thu Dec 14, 2017 4:15 pm

Thanks, TIG.
I guess my age status/memory was playing tricks on me. :}

Also, what works is assign a shortcut key to "Make Selected Text Dynamic" and the Text tool.
Draw a label. When finished and the Text tool is still active, pass (and keep) the cursor over the leader to select it and then use the shortcut for "Make Selected Text Dynamic".

.... I don't suppose a script could do something similar, could it? Add Datum would start the Text Tool and also an observer of some kind which looks at Text tool activity. When the user completes the label, it is selected and the "Make Selected Text Dynamic" is applied.
0
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: [Plugin] Add Height from Datum

Postby Gillan » Sun Jan 14, 2018 7:26 am

Awesome way of solving RL datums on my drawings, however as the post above we also use a RL in Meters. Is it possible to use M instead of MM, this would solve the issue
0

Gillan 
 

Re: [Plugin] Add Height from Datum

Postby BradMDG » Fri Sep 14, 2018 6:44 am

First and foremost, thank you for your amazing scripts in general! Question, I downloaded Height From Datum today for a project that is stretching my boundaries. I LOVE the idea of clicking and instantly showing the datum. My problem is (see attached photo) that when I bring the model into Layout, some of my labels "stack up" and become impossible to read. I know this has been a problem with prior posters. Question/suggestion, could you have an option in a custom menu where you could angle the text at a 45 deg orientation so it doesn't stack up as easily? I'm ready to fund some of your precious time if you can assist.

Thanks!!!
0

BradMDG 
 

Re: [Plugin] Add Height from Datum

Postby TIG » Fri Sep 14, 2018 1:21 pm

Unfortunately Text placed through the API can't be associated with geometry.
However, you can use Move to relocate your Text arrowhead - or the Text tool itself... and you can also use the Text tool itself to relocate the text-string relative to the arrowhead, so in that way you can adjust where the strings go in a view and avoid clutter.

Although the Text's arrowhead head is not linked to geometry when it's added through the API, you can link it afterwards by using the Text tool itself, to edit the arrowhead position, at which point it gets linked to any geometry you snap onto...

You can't change the angle of Text objects, they automatically always get made horizontally aligned.
The @vec can be adjusted in the Ruby code, but that simply changes the default position of the string relative to the arrowhead.
Subsequent editing of the Text string's location will result in that vector changing...
0
TIG
User avatar
TIG 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Previous


 

Return to Plugins

cron

Who is online

Users browsing this forum: Google Bot, karrimu, Vt_Hadano and 8 guests

Visit our sponsors: