Jump to content
  • 7

Make Symbols Unique


MTRobin

Question

Recommended Posts

  • 0
Guest Frank Brault

Keep in mind that Converting to group would delete part of the geometry depending upon what projection you are in. Also, any top level data records would be stripped away as well. Additionally, if this was performed upon a Lighting Device object as it seems you want, there would be extra steps. I think you could more cleanly try this:

  1. Right-Click on the Lighting Device that you desire to one off and choose Locate Symbol in the resource Browser.
  2. In the Resource Browser, Right-Click on the symbol that was found by the previous step and duplicate it, naming it similarly to the former symbol name, and make the desired edits to this new symbol including any changes to the 2D and 3D geometry and data records.
  3. Now go back to the Lighting Device in the document window selecting it if necessary, and click on the Replace Lighting Device in the object Info palette.

It is not the same order, but this accomplishes the same result as the Sketchup workflow. This works specifically for Lighting Devices. Other Symbol based objects will have slightly different workflows and possibly additional steps.

Edited by Frank Brault
added more detail to step 2.
Link to comment
  • 0
11 hours ago, Frank Brault said:

Keep in mind that Converting to group would delete part of the geometry depending upon what projection you are in

And break any hybrid functionality... but I love the idea of this, it would certainly make that bit of workflow a lot slicker.

Link to comment
  • 0

I had a little time off this afternoon, so I made this tool.  It will grab all of the data from the latest selected symbol, and essentially duplicate it in the same Resource Manager folder and with the same insertion options.  It will then delete the source selected symbol and insert the new one in its place, applying the class and scaling data from the original.  The only thing that you will lose is any attached record data.  It will prompt you to enter a new name for the symbol, and will autofill with the syntax <Original Symbol Name>'-#', with the number automatically incrementing to the next available number.  It's even smart enough to parse the source symbol's name to determine if the last token is a number, then to start incrementing based on that.  For example, if you run the command on a symbol named "Symbol-A-1", the script will suggest "Symbol-A-2" as the new name.

 

It will also work on purely 2D symbols, purely 3D symbols, or hybrid symbols.

 

To install it, follow the steps below:

  1. Download attached .zip file to a convenient location
  2. Start Vectorworks, if it isn't open already
  3. Go to Tools - Plug-ins - Plug-in Manager
  4. Click on the Third-party Plug-ins tab
  5. Click on the Install button
  6. Point Vectorworks to the .zip file you downloaded earlier
  7. Restart Vectorworks
  8. Go to Tools - Workspaces - Edit Current Workspace
  9. Click on the Menus tab
  10. In the box on the left, scroll down and expand the category named JNC
  11. In the box on the right, find a home for the command to live, such as Modify or Tools
  12. Click and drag the command Make Symbol Unique from the box on the left to a destination on the right.
  13. Click OK

 

Likewise, you can put the command into the menu Object Context so that it is available with right-clicking an object, or assign a shortcut key to it.

 

The script is also smart enough to detect whether the selected object is a symbol, and will tell you if the most recent selected object is not a symbol.  MAJOR NOTE: the symbol must be on the currently active layer, as it uses the FSObject command to find the symbol.  If you have your Layer Options set to Show/Snap/Modify and select a symbol on a different layer, the tool will yell at you for not selecting a symbol.

 

Let me know if you have any questions or if the tool behaves unexpectedly.

 

 

 

 

Make Symbol Unique.zip

Edited by Jesse Cogswell
Patched infinite loop bug on symbols embedded in symbols.
  • Like 1
Link to comment
  • 0

This is a great tool @Jesse Cogswell.

 

What would be a cool improvement to this, if possible, is to have the duplicate symbol retain the record data info attached. Duplicating a symbol in the RM just duplicates the default record values. If a symbol instance, with it's own unique record data, could be turned into a unique symbol and retain it's data as its default values that would be pretty cool!

 

Also I had a quick play and I'm not sure it works as intended on page based symbols? The new symbol is scaled up by whatever the current design layer scale happens to be.

 

This is a welcome addition to my workspace 🙂

 

Link to comment
  • 0

 

@drelARCH & @Boh thanks to some ideas from @Pat Stanford, I was able to overhaul the way the plug-in works and come up with a way to keep attached records and retain the linked text.  It should work with RM tags, but I haven't really tested them, but any record formats and data should come through.  I did a quick test with page-based symbols, and things appear to be working fine, but let me know if you still see anything weird.

 

Updated file attached.  To install it, follow the same instructions above through step 7 (assuming you haven't moved the tool around in your user folder.  If you have, delete the .vsm file for it before installing), no need to edit your workspace again.

 

 

 

Make Symbol Unique.zip

Edited by Jesse Cogswell
Patched infinite loop bug on symbols embedded in symbols.
  • Like 1
Link to comment
  • 0

Thanks @Jesse.

On a quick test I just noticed that the records are retained, which is great, but it looks like the data in the record is a duplicate of the default data values from the original symbol definition. Is there a way to have the new symbol take on the record data of the symbol instance? See vid.

 

I don't think at the moment vectorworks has a clever way of editing symbol definition data quickly. Your script might be a good way of getting this sort of data attached to symbols and in a Library file so it can be reused easily in other files.

 

Cheers

Link to comment
  • 0

@Boh Retaining the original record defaults was the idea, but I can see how overwriting the defaults could also be useful.  I've added some code so that if it detects that records are being transferred, it will poll whether you want to overwrite the defaults using the current data.  It will ask you for each attached record, so if you don't want to overwrite all of the records, you don't have to.

 

Updated  plug-in attached.

Make Symbol Unique.zip

 

 

Make Symbol Unique.zip

Edited by Jesse Cogswell
Patched infinite loop bug on symbols embedded in symbols.
  • Like 2
Link to comment
  • 0

I don't know why but when I go to install the plug-in and put it in my workspace it is greyed out. Have tried several times, uninstalling, reinstalling etc. Restarting ve, restarting the computer...

 

It worked fine when I installed your previous iterations of the script.

 

I also noticed incidentally that I happen to have a few other of your scripts in my workspace. "Get Viewport Location" and "Set Viewport Location" have also become unselectable though "Copy Viewport Settings" is ok.

 

Any ideas what is going on?

 

image.png.58c1dea4b1d87e6b88125f77d44a65b2.png

 

Link to comment
  • 0

Do you have something selected?  The tool will not work if nothing is selected, and will be greyed out in the menu.  If you do have something selected when trying to run the tool, then we have bigger problems.

 

I don't think "Get Viewport Location" or "Set Viewport Location" are mine, but they likely have a similar issue.

Link to comment
  • 0

Got it.  I originally tried to keep things a bit simple by using FSActLayer to get the handle to the selected symbol, but that won't work on symbols inside symbols or with symbols inside viewport annotations.  I've amended it using a ForEachObject call instead, which will now be able to pull the symbol correctly from inside other symbols and inside viewport annotations.  Let me know if you find any other instances where it doesn't work the way it should.

 

 

Make Symbol Unique.zip

Edited by Jesse Cogswell
Patched infinite loop bug on symbols embedded in symbols.
Link to comment
  • 0

Hi @Jesse Cogswell 

 

I found some QOL 'errors':

- When you use the plugin on a mirrored 2D or 3D symbol the new unique symbol gets mirrored back

- When you use the plugin on a 3D symbol placed on a design layer with a Z height of example 6000mm the new unique object Z will be -6000mm. It's preferable that the new unique symbol stays at the same place.

 

Feature request:

- When I select multiple instances of the same symbol and use your plugin only one of them will become unique. It would be great if all of them wil be replaced by same new unique symbol. This is similar in how SKetchUp 'make component unique' works. 

Edited by MarcelP102
Link to comment
  • 0

SCOPE CREEP!!!

 

Jesse, remember WAD (Working as Designed) not an error.  No one ever specified all of these extra options were required.   😉

 

How much are these changes worth to you Marcel? You realize that Jesse has done all of this so far out of the goodness of his heart and because a few of this think coding is fun.

  • Like 1
Link to comment
  • 0

Haha Yeah Pat you are right. The functionality is there already. These are more QOL 'errors'. As I said before (in the other topic) I appreciate all the work Jesse has done so far. The outcome is already a script that will save everyone a lot of time. 🙂

 

@Jesse CogswellRight now I can only say Thank You! But if you leave a Paypal address I make sure my boss will do a donation for all the work you have done.

Edited by MarcelP102
  • 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
Answer this question...

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