Dynamic Dimension Tool - How to show attributes values in 3D as it happens in the Dimension tool (by code)?

Hello Masters of Sketchup!

I’m looking for some solution in how to show a values sizes (Heigth and length) in my DC.
I have read some simillar solutions, but nothing like I want. Apparently, using RubyApi to develop this.

I want to show this values, but not putting manually every time. The best solution, should DimentionTool be a Dynamic Compponent, possible to get the values in parent!, for example. This is what I want and looks easy.

The problem is: the actal DimensionTool can’t be inside a DC (they dont hide in Layers or when copy is reduced/deleted).
When I create copies, this need to be able to show the spaces values, even if changed (when my show attribute =1 and hide when =0)

This could be solved creating a LINE, with TEXT DIALOGBOX (in widh/2) reflecting the HEIGTH or WIDTH Values, to emulate de DimensionTool. But how? :sweat_smile:

if anyone have a solution, topic, or video to show how made this, I’ll be gratefull :hugs:

thanks a lot for patience with my bad english rs

ADD information:
The problem when Copies (green and pink) goes away. The Quotas stay showing instead to vanish

Can’t help but interested in any solutions…

1 Like

you can make the dimension a DC and copy that

amended

dimension copies.skp (35.2 KB)

2 Likes

hello!

tks for the anwser
I forgot to tell my sketchup version. Can you save in 2020 or less, please?

appreciated

Here you go.
dimension copies 2018.skp (40.0 KB)
Nice work @pcmoor!

sorry about thar :sweat_smile:

can you save in 2015, please?
(your version is 2019, but dont work here)

error version

hi! :grinning:

I created the follow solution:

I used two DC aready existing to make a guide to DimensionTool. Basically two little squares, Original and Copy. The DImensionTool is between them.
This works

The original DC stay in 0(zero) position in Z, and Copy get the values of Space between shelves. (in pics examples is not in correct place, cause Im fixing position in copies yet)

but

when I save it, The DimensionTool in Copies disappear after “Fix problem in model” message error (screenshots).

Some of you know what is this conflict and how fix this problem?

Thanks for cooperation



dimension copies 2015.skp (60.0 KB)

Here you go.

1 Like

Thanks for share this solution!

so, the DimensionTool is not able to create a DC alone (with righ click> create DC), but adding a simple line and combining Line and DimensionTool, it works.

After this, I deleted the line and stay in scene and in programming just the DimensionTool :grinning:

Is that what you did, rigth?

I never had used the function “choose”, I was using If(copy=1,X, If(copy=2,Y, etc… ))

the choose looks easier and less code lines.

thanks a lot

My pleasure, but you should give the solution to @pcmoor, he did all the work.

True! :sweat_smile:

Thank you so much for solution!

Very appreciated :+1: