Jump to content
Developer Wiki and Function Reference Links Read more... ×
Heblon

Scale Symbols in Marionette

Recommended Posts

Hey There,

 

after a few days of learning Marionette I started creating some small Objects I've always missed in VW.

 

Right now i started creating a small Tool that places a Hybrid height signature wich labels itself because I really hate my Multistamp workaround. This is just a first function test so be patient :P 

It places a Hybrid Symbol and moves it on the z-axis and labels it with the value used to move it.

I would like to scale text size and symbol size with one parameter by I don't know how to scale the symbol.

I thought about transforming the symbol into a group and then scale it or might there be a direkt way like the rotation angle accessible with the BIM-Node "Symbol"?

 

Cheers!

 

Bildschirmfoto 2017-11-25 um 21.29.49.png

Edited by Heblon

Share this post


Link to post

Oh,

 

i did realize that this won't work as expected, so I need a new concept...

 

If I change the z-height of the marionette object it adds the inserted height to my 3D Point in my Hybrid Symbol.

So my idea would be to generate the z-value from the z-coordinate of the marionette object itself.

Is that possible? with a string?

 

regards

Edited by Heblon

Share this post


Link to post

Okay,

 

I found a solution for my incorrect z-value Issue with Parent PIO, also I found out that it is much more easy to write the value in a record field than trying to rotate text inside marionette.

 

But still I am not able to scale the symbol.

Also I am trying to find a way to kill everything after the second position of the decimal point.

 

Anyone some idea how to fix this?

 

Cheers!

 

 

Bildschirmfoto 2017-11-26 um 02.39.26.png

Bildschirmfoto 2017-11-26 um 02.43.49.png

Share this post


Link to post

So,

 

the scaling thing works, the rounding also, now I need a way to trail only the zeroes after the specified characters to display... I tried to add 0,00 but it did not work out.

 

5a1ac2a68ae0b_Bildschirmfoto2017-11-26um14_30_50.thumb.png.6998fa7a3467d2f63ff39fdc7a86efeb.png

Share this post


Link to post

In order for trailing zeros to show up, the number must first be converted to a string - I have written a node that converts numbers to strings as well as adds document units, its called Format Units. I have added another node to the file that does the same thing except does not add the unit abbreviation.

 

HTH

 

FormatUnits.vwx

Share this post


Link to post

Hi sbarrett,

 

this works great!

Is there a way to access the "Manual Precision' with an input? 

 

At first I was like "oh that is super easy" but things got far more complex than I thought :D

But step by step, just started out...

 

I added a file here.

To sum it up:

5a1c56da723d9_Bildschirmfoto2017-11-27um19_13_45.thumb.png.ee0ec93bfc40ab34b75612bbecbfff20.png

I want an intelligent symbol to label heights and deliver a hybrid view and can be placed on site model.

Further I would like to choose between 4 different symbols, if selected with impact on text origin and text style, but step by step...

At the moment I try to figure out how i control the text. Is it possible to adapt parts of the font style from the marionette object itself?

If I activate the "add seccond height" in the PIO I would like to delete the seccond text object because not needed if there is no seccond height. Any solution on this?

 

Höhenplanung.vwx

 

Cheers!

 

Edited by Heblon

Share this post


Link to post

I have added another version of the node that has an input instead of an OIP input. I also simplified it (I removed the aspect of overriding the document units). To create a pop up menu to choose symbols is definitely possible - it involves a tiny bit of coding though. There is a Popup node in the Input folder, and it allows you to create a popup list if you double click on it and follow the instructions in the code. The output of the node is the index of the list item chosen, so if you have a matching list of strings elsewhere in your Marionette network than you can use a Get Item node and the output of the Popup node to access the correct string. 

 

To delete an object based on a True/False value, you can use a Valve node in the Data Flow folder, which allows you to block aspects of your network, or you can use a Filter node and my version of a Delete node - I put examples of how they work in the new Format Units file.

FormatUnits.vwx

Share this post


Link to post

awesome! thanks a lot.

 

Yeah I changed the script of the input-popup node, but somehow i changed every node, maybe I should duplicate the node first and try it again.

 

Cheers!

Share this post


Link to post

The Get Font ID node allows you to set a font by giving the name of the font, or you can create a Text Style in Vectorworks as a resource and access it in your network by using the Set Style Ref node.

Share this post


Link to post

That style reference node seems to be a much better workaround that the actual concept. thanks again!

Share this post


Link to post
6 minutes ago, Heblon said:

awesome! thanks a lot.

 

Yeah I changed the script of the input-popup node, but somehow i changed every node, maybe I should duplicate the node first and try it again.

 

Cheers!

 

Whenever you change the code inside a node, you should first delete the very first line of code that starts: #COMMAND;

 

This line creates a link between a text file and the node so nodes can be updated with new versions of Vectorworks. Deleting this line breaks the link, similar to ungrouping a symbol, allowing you to edit the node without affecting others. You can then save it as a plug-in object to use again later.

 

Best of luck!

Edited by sbarrett

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×