Jump to content
Developer Wiki and Function Reference Links ×

Profile Symbol


willofmaine

Recommended Posts

Is there a way to use a profile symbol in a Marionette object (such as for extrudes and EAPs) such that when the profile symbol is updated (i.e., it's 2D profile shape is changed) all Marionette objects using that profile symbol will automatically update accordingly?  

 

With what I have right now, it seems necessary to use a profile symbol that "converts to group," which of course means once it's used by the Marionette object it's no longer linked to the original profile symbol.  It would be nice not to have to edit many instances of a Marionette object using the same profile symbol in order to get their scripts to rerun so that they recognize the updated profile symbol...

 

Thanks!

Link to comment
  • Vectorworks, Inc Employee
19 hours ago, willofmaine said:

Is there a way to use a profile symbol in a Marionette object

Have you tried using "Control Geometry"? It should do what you want. You can have nested groups inside it and access each sub-group by criteria. @DomChas also made a node that will do this, overcoming some of the limitations of the stock node.

Link to comment

Basic Idea: Put the Symbol into the Control Geometry. Inside the Marionette, extract the 2D portion of the Symbol Definition and use that as the profile for your EAP. If you then change the symbol definition and reset the Marionette, you should have the new profile in the EAP.

 

I don't know if the nodes to do this exist in Marionette. I know you can do it in Vectorscript, so it can be done in Python and therefore it can be done in Marionette, but maybe not yet.

Link to comment

I assume we're talking about the "Control Geometry" node.  How would I put a symbol into that node?  I don't think it even has an input port.  

 

In any case, I don't have any problem doing what you describe above.  What I'm after is being able to update the symbol definition without having to reset all of the Marionette objects using that symbol definition (which could be quite a few Marionette objects, such as in the case of door and window trim, for which there likely would be many different sizes).

 

Or is there a function to reset all Marionette objects in a file, or some such thing?

Link to comment

"ALL plug in objects" like what?  I just did a quick experiment with my Marionette object and some Door PIOs set to different sizes.  I duplicated the Marionette object a few times, then updated one of the profile symbols.  When I "Reset All Plug-Ins", the Marionette objects all updated, as desired, but the doors retained their sizes (which is good).  But it leaves me wondering what types of PIOs, other than Marionette objects, would be affected?...

Link to comment
  • Marionette Maven
Just now, willofmaine said:

"ALL plug in objects" like what?  I just did a quick experiment with my Marionette object and some Door PIOs set to different sizes.  I duplicated the Marionette object a few times, then updated one of the profile symbols.  When I "Reset All Plug-Ins", the Marionette objects all updated, as desired, but the doors retained their sizes (which is good).  But it leaves me wondering what types of PIOs, other than Marionette objects, would be affected?...

 

Windows, Doors, Fireplaces, Cabinets, every other parametric object that Vectorworks has, those will all be reset - resetting doesn't mean "set back to defaults", it just means rerun the behind-the-scenes script with the current defined parameters. It shouldn't break anything, but depending on how many PIOs you have in your document, it could take a while.

Link to comment

Here is a script that will only reset Marionette objects and not other PIO types.

 

Procedure ResetMarionetteObjects;

{© 2017, Patrick Stanford, pat@coviana.com}
{Licensed under the GNU Lesser General Public License}
{No warranty expressed or implied}
{Use at your own risk. Side effects may include loss of libido.}


Begin
	ForEachObject(ResetObject, ((R IN ['MarionetteObject2D'])));
End;

Run(ResetMarionetteObjects);

Don't you love it when the comments are longer than the script ;-)

  • Like 1
Link to comment

Yes, it is a Vectorscript.

 

Go to the Resource Manager. Click New Resource. Type is Script. It will ask for a name for the Script Palette, I usually stick with the default, but you can name it what you want. It will then ask for the name of the script. I would name it something like Reset All Marionette. The Script Editor will then open.

 

Copy and past the script in the the script editor and click OK.

 

Double click the script in the script palette to run it.

 

 

Link to comment

This seems to work(!!).  Anything wrong with it?...

 

Procedure ResetMarionetteObjects;

{© 2017, Patrick Stanford, pat@coviana.com}
{Licensed under the GNU Lesser General Public License}
{No warranty expressed or implied}
{Use at your own risk. Side effects may include loss of libido.}
{insymbol added, WJT}


Begin
    ForEachObject(ResetObject, ((R IN ['MarionetteObject2D']) & (insymbol)));
End;

Run(ResetMarionetteObjects);

Link to comment

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...