Jump to content
Developer Wiki and Function Reference Links ×

Worksheet Duplication from list


Recommended Posts

Hello!

 

So, I'm trying to create a Marionette system to grab data from an Excel from a particular row, grab that data into a list, and use that list to create/duplicate/rename Sheet layers, design layers, and worksheets. I have the design layer and sheet layer side if it working properly, but I'm a little stuck on the worksheet part. There are some nodes I have found to select symbols, or duplicate objects, but none of them seem to grab a worksheet handle (i know a worksheet is not a symbol, but i tried anyway). Anyone have an idea on how I can accomplish the remainder of this task?

Link to comment

This is a Vectorworks Worksheet that I am trying to duplicate, but the list data I am grabbing from an outside Excel Sheet. I have made a worksheet that counts certain symbols inside Rooms that I'm using as a key, that I want to duplicate/rename from provided list and place on corresponding Sheet Layer. 

Excel Reference.xlsx

Excel Reference Marionette.vwx

Edited by wellebracht
Wrong vwx file lol
Link to comment
  • 1 year later...

I missed that this was Marionette forum.  

 

GetResource node should give you a list of all the worksheets in the file. Then you should be able to filter that list to get the one one want and then use DuplicateObject to make the copy.  Not sure about the rename, but should be possible.

 

Also not certain what input you will need to vie GetResource to have it return the worksheets.

 

Sorry

Link to comment

Yes, I tried Duplicate Object. It will work on a Worksheet image that's placed in the drawing already, but I can't get it to work for the Worksheet itself in the RM.

The naming part is working well though using the Set Name node.

Link to comment

The Duplicate node uses the CreateDuplicateObject Vectorscript function. That will not duplicate resources. 

 

You will need a node that uses the HDuplicate function instead.  It would be fairly easy to create.

 

But it is likely that the script for the node would be longer than a script to duplicate the resource directly.

Link to comment
  • Marionette Maven

The Copy node uses HDuplicate.

You'll need to use a Set Name after to name the new worksheet, otherwise it won't create a new resource.

I'll make a note to try to handle that better.

Also - the copy node is cool because if you don't wire the output of the copy node to something else, a copy won't get made. I'm not sure if that's beneficial in this case, but when I was looking it over, I saw that's how it's implemented.

  • Like 1
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...