Jump to content
Developer Wiki and Function Reference Links ×

Scaling 3D Symbols


Recommended Posts

You are not doing anything wrong. Scale just does not work on Symbols.

 

It does not work because the Symbols don't respond to the HScale3d Vectorscript command in the Scale node. They have to be scaled using a different method.

 

OH @Marissa FarrellWe need a node to take a tuple of real values as input and SetObjectVariableReal for the three scaling factors.  The object selectors are 102, 103, 104 for X, Y, and Z scaling.

 

SetObjectVariableReal(MyObject, 102, XScaleFactor)

SetObjectVariableReal(MyObject, 103, YScaleFactor)

SetObjectVariableReal(MyObject, 104, ZScaleFactor)

 

If it does not show up by Monday night I might take a crack at it myself, but I won't have time before then.

Link to comment

Help!  Now I'm having trouble with this node.  When I copy and paste it, or import it, into a brand new blank file, I can't get it to run.  Files 02, 04, and 06 include detailed explanations of what's happening.  (Files 01 and 05 are just for reference).  Maybe I'm missing something simple...  

 

Thanks!  Will

 

 

01-ScaleSymbol3D_v2017-Marissa-MLF 06-09.vwx

02-Copy and Paste.vwx

04-Name and H-02.vwx

05-Operations-WJT-Application Support.vwx

06-Import Node.vwx

Link to comment
  • Marionette Maven

The problem you're encountering is that you're trying to match the string in the Name node to the name of your symbol in the Resource Manager.

Name has to match the name of your symbol on the document in the Object Info Palette. So in my original file, I named the symbol instance "s" in the OIP and the Name node references "s" in the OIP.

 

Let me know if you still need help!

 

(Also, obj and h are irrelevant. We're internally changing the prefixes of ports on nodes to be more helpful for the user. This will make more sense later ;) )

 

Link to comment

Ah!  I see.  That little "Name:" field at the bottom of the OIP.  So that two or more instances of the same symbol can't have the same name (which I'm guessing would confuse Marionette?).  I'd thought maybe your "s" was looking for symbols (the way "s" finds symbols when used in a worksheet) but, of course, that would have been really tricky, what with a script trying to process all of the symbols in a drawing... 

 

So, okay....  When I originally tried your ScaleSymbol3D node (and it worked without a problem), I'd plugged it into a similar network, but one that also had a Symbol node (see attached file).  And in that case, a String node (not the Name node) seems to identify the source symbol (I guess from the Resource Manager?...).  Ultimately, with different combinations of input nodes and with or without the Symbol node (see file), I get confusing results.  Which leads me to:

 

What's the difference between the "Name" and the "String" input nodes, and how does one choose which to use?

 

And, more generally, is there a document, or some similar source, that lists all of the default nodes with more detailed explanations of their use (beyond the "Description" available for each node via the OIP)?

 

Thanks!  -Will   VWIS105

 

 

Link to comment
  • Marionette Maven

I'll try to answer these as clearly as I can, but if I fail to make sense, let me know and I will try to clarify further.

 

In the network I shared, I already had a symbol on the drawing area, so I used the Name node to reference that specific instance. The Name node will search for an item in your document that matches that name (this can be an object, a layer, and some other types of objects in Vectorworks that have what is called a 'handle', which basically is a unique identifier)

 

When you made your network using the Symbol node, the Symbol node actually returns the 'handle' to the newly placed Symbol instance in your document, and since the ScaleSymbol3D node wants a 'handle' as an input, the network ran correctly. The Symbol node takes a String input (the name of your Symbol in the RM) because it looks specifically at symbols and not all types of Vectorworks objects.

 

As for the difference between the Name node and the String node, the Name node has a very specific use (returning the handle to an item, as stated above), whereas you can use a String for multiple uses (i.e. defining what a Text node will put on your drawing area, naming an object, or pretty much any other thing you would type a word into)

 

There currently isn't an official (or even unofficial, to my knowledge) document/database that gives more specific uses for nodes, HOWEVER we are in the process of adding prefixes to all of the ports on nodes to help users easily identify what type of data is flowing out of a node's port, as well as what type of data a node's port is expecting. (Which is why you saw my new Name node has 'h' as the output port, which refers to a type of 'handle')

 

There's a plan in the pipelines later to expand upon use cases for nodes on a more descriptive level, but that will likely take a lot longer than defining what type of data is flowing through wires, so we tackled that goal first.

 

I hope this helps clear some things up, but if you need a little more description on anything, let me know and I'll happily keep going ;) 

Link to comment

Marissa, jump in if I am off on this.

 

As of VW2017, for a Marionette network to operate on an object it needs a way to identify what object you want to operate on. The two primary ways to do that are to either put the objects into the Control Geometry (where the objects actually become part of the Marionette object) or to use Criteria to specify which objects to operate on. Name is really a specific type of Criteria that uses the name of the object as shown at the bottom of the OIP.

 

If you wanted a way to modify more than one object at a time you could use different criteria. Layer and Class are always good options, but Color, Line eight, Object Type, Record or Field data, or something else might be better for a specific case. The challenge is to identify a set of criteria that will identify ALL of the objects you want to modify while NOT identifying ANY of the objects you don't want identified.

 

Currently Marionette can not use Selection State as part of the criteria because when you run the network you have to select it (changing the selection state of the drawing to just that Marionette Node or Network).

 

If you have multiple objects you want to ScaleSymbol3D, the easiest option is probably to create a new Layer (or Class) and temporarily (manual) move the objects there, run the Marionette, then move them back. I prefer Layer just because I am more likely to the the Layer Options set to Show/Snap Others and the Class Options set to Show/Snap/Modify Others. That means if I use Class, I will have to manually select the objects. If I use Layers, I can change the layer and Select All in a single step.

 

HTH

Link to comment

Back in the discussion

Another way to operate is to go back to vw use of symbols. I’ll try to make myself understandable. First I build my object from the symbols in 2 or 3D and the marionette script, including the scale part (see earlier in the post). Second I duplicate the object and create a symbol of the object. Then I have the choice, or I use the object (copy paste etc…) and it becomes easy to change its size as a unique object, or I decide I will need to change all the objects so I draw with my symbol and edit it if necessary using then the scale function of the script. In that case all the objects are changing.

Again for me marionette is a tool like all the others, sometime it’s faster to draw a rectangle than to use marionette sometime not. At the end what count’s is the gain of productivity (and the pleasure of achieving scripts!).

Link to comment

@the frog,  you are completely correct. My understand of @willofmaine's problem was that he wanted to use Marionette to scale a single instance of an already existing symbol. 

 

As you say use the right tool and it makes it easy.  If all the symbols should be scaled by the same amount, then just edit the symbol and be done without needing Marionette.  To create scaled symbols, you need to process each individually. Your way works fine as long as you don't mind most of your objects being Marionette objects inside of symbols. It does make it harder to access the information in a worksheet.

 

It all depends on what you are comfortable with and how your brain works.

 

I used to do a presentation titled "Seven ways to shorten a line in VW".  It just depends on the situation and the requirement.

 

The flexibility is one of the great points of VW. And this forum is great in that you almost always end up with more than one way to accomplish any desired outcome.

  • Like 1
Link to comment
  • 6 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...