Jump to content
  • 0
Samuel Derenboim

Write record information to symbol

Question

Hi, 

Many a time where you happened to want to create a library but found it too cumbersome because the record information must be written directly in the resource manager rather than a spreadsheet?

 

Is it possible to write existing record information inside of a symbol to the symbol definition please? This would tremendously expedite symbol and library creation.

Share this post


Link to post

15 answers to this question

Recommended Posts

  • 0

a script can be written to take data from a spreadsheet to record fields.  I don't know how to do it, but there are many here who can help you with it.

Share this post


Link to post
  • 0
1 hour ago, Rob Books said:

a script can be written to take data from a spreadsheet to record fields.  I don't know how to do it, but there are many here who can help you with it.

It doesn't work exactly the way you mean.

Yes, you can write record information to a symbol from a worksheet. The problem is - it will not write it to the symbol definition for use with different files or integration into the resource manager.

Share this post


Link to post
  • 0

if you have a record attached to a symbol then that data will be there for each instance, and will be retained in the symbol itself in the Resource Manager.  I use such scripts for libraries now.  I just don't know enough about the coding to tell you how to do it.

if you are looking for instance attachment of data, then I am not so sure on.  But I think it can be done, as Door and Window data can be altered in worksheets, Lighting Instrument data can be exported and changed through Lightwrite, then re-imported.  So it may depend on the what, and may not be layman easy, but it is possible.

Share this post


Link to post
  • 0

Really? you have a script that can write instance record information to symbol definitions? You already have a ready script? or are you saying it's just possible ?

I just wanted to add this request to the wish list since i too don't think this is an impossible feature. :)

Share this post


Link to post
  • 0
9 hours ago, Samuel Derenboim said:

Really? you have a script that can write instance record information to symbol definitions? You already have a ready script? or are you saying it's just possible ?

I just wanted to add this request to the wish list since i too don't think this is an impossible feature. :)

 

Assuming you have one instance of this symbol selected, you can use the active handle to retrieve the values, get the handle to the definition itself and overwrite them.

From then on, any new placed instance will use the updated record information.

Share this post


Link to post
  • 0
14 hours ago, Samuel Derenboim said:

Is it possible to write existing record information inside of a symbol to the symbol definition please? This would tremendously expedite symbol and library creation.

 

Yes, it is.

  1. When you do "Link Text to Record" The text field will show the Records Default. (Or attach a record to a symbol definition).
  2. Now edit the symbol and make sure to select nothing
  3. In the object info palette select the record and edit a field This changes the Symbols Default value for that Record.
  4. Place a new symbol on drawing: voila!
  5. Existing records are not affected

Link text to record, Showing Records Default:

5a83ecb4444ef_Vectorworks2018ScreenSnapz022.thumb.jpg.b203e8244dc1d1a6f15a1ec2a08c5a37.jpg

 

Select nothing!! Edit the records field value:

5a83ecb3c7f92_Vectorworks2018ScreenSnapz023.thumb.jpg.8dc036a373f48f61214f888ab05d916e.jpg

 

New Symbols will show the Symbols Default for that field, existing instances are not affected:

5a83ecb2a3790_Vectorworks2018ScreenSnapz024.thumb.jpg.21e0b4d869f9994f5a113d16520b59c9.jpg

Share this post


Link to post
  • 0

Gerard, 

that process is for a symbol instance. That’s the easy part. Now try importing the same symbol from the resource manager into another file, you’ll see the record information is empty in the symbol, and even if you apply it, the record fields need to be re entered. 

 

In in order to avoid that, you need to write what’s in the symbol instance (An example of what you’ve shown) to the symbol definition (resource manager). That way if you make a shared library in the resource manager you can drag and drop with the desired resource information without constantly having to refill it. Currently the only method of doing that is by right clicking every symbol definition and modifying its record information from the resource manager, which is very cumbersome, and wanted to ask vw or someone to help me make a script to write the information from symbol instances to their respective symbol definitions.

 

any help from vw?? 🤓😇

Share this post


Link to post
  • 0
9 minutes ago, Samuel Derenboim said:

that process is for a symbol instance. That’s the easy part.

No,  I'm editing the definition.

 

Now try importing the same symbol from the resource manager into another file, you’ll see the record information is empty in the symbol, and even if you apply it, the record fields need to be re entered.

You can't import an instance through the Resource Manager. You can only copy and paste instances. Through the Resource manager you only get the Definition.

Share this post


Link to post
  • 0

Hi Samuel,

I think you have a library with a lot of symbols.

Those symbol definitions don't have records, but the instances do.

Like so:

5a843cbcbf6f3_Vectorworks2018ScreenSnapz025.thumb.jpg.d52e13d23ab93cd09a44264d6ee037e3.jpg

Instance has data

 

5a843cbbafc4b_Vectorworks2018ScreenSnapz026.thumb.jpg.9e29e280a5ec92ede7a907e7c3faead7.jpg

Definition hasn't.

 

I wrote a silly little Vectorscript command for you (after all it is Feb 14, everybody deserves some love).

Move Rec from Inst to Def.vsm.zip

Move Rec(ord information) from (Symbol) Inst(ance) to (Symbol) Def(inition)

 

After running this command your Symbol Definitions should look like this:

 

5a843e5de7727_Vectorworks2018ScreenSnapz027.thumb.jpg.6df5848e91bf715e945f21fe9944f2a6.jpg

 

Plug-in will run in VW 2015 and up.

 

Hope it helps. Have fun,

Gerard

Share this post


Link to post
  • 0
6 hours ago, Gerard Jonker said:

I wrote a silly little Vectorscript command for you (after all it is Feb 14, everybody deserves some love).

Move Rec from Inst to Def.vsm.zip

Move Rec(ord information) from (Symbol) Inst(ance) to (Symbol) Def(inition)

 

Hi Gerard.

I tried downloading the file, unzipping, copying contents of file into a new script and it didn't work.

 

I'm clearly doing something wrong? Can you point me in the right direction?

Share this post


Link to post
  • 0

It is a plug-in menu command.

  1. Unzip
  2. Place into Plug-Ins folder inside User folder *
  3. Restart Vectorworks
  4. In Vectorworks go to Menu bar Tools:Workspaces:Edit The current Workspace
  5. Drag the menu from left to right in a menu of your choice

To find the User folder

  1. Go to the Vectorworks preferences
  2. Click the Tab called User Folder
  3. Click either "Reveal in Finder" or "Explorer"

Are you sure you need this command?

Having to copy Records from Symbol instances to the symbol definition is a very uncommon situation. In the 25 years that I give support for MiniCad/Vectorworks I haven't run into this before.

If you select no objects, the command will run through your document and execute the script for each symbol instance it encounters.

Edited by Gerard Jonker
  • Like 1

Share this post


Link to post
  • 0

Thanks for that.

 

Yes I wouldn't normally use this but I am reworking a symbol library and template files from scratch so I thought this might be useful. I have a lot of light symbols for example that I would like to set default records for.

 

With that being the case, for me it would be better suited as a script command contained only in the symbol library file rather than as a menu command.

Share this post


Link to post
  • 0

HOLY (*&#)$(*&#($*&#$ !!!!!!!!!!!!

 

Gerard, you are THE MAN! This works like a charm!!!

 

Just curious, did you learn to code in Vectorworks? or did you know python prior to??? How hard is it to learn?

Either way, Gerard, This script is excellent. Don't know how to thank you enough.

 

Gerard, Thanks with this tool, I would be able to create an ample resource for libraries for light fixtures, FF&E, proprietary specifications, and even custom callouts for details (if i can get the callout tool to work for symbol definitions).  Do you work for Nemetschek / VW?

 

I can share some of the libraries with you later if you like. Integrating this into project management saves a substantial amount of time on the production of CD's !

Edited by Samuel Derenboim

Share this post


Link to post
  • 0

Hi Samuel,

 

Thank you.

I had already learned a little Pascal at the University before I encountered Vectorscript. The most difficult thing about Vectorscript is running through the (V)SFR* trying to understand all "hooks" into the Vectorworks file.

It is not so hard to learn, especially if you take existing scripts and rebuild them to what you want them to do.

I still have to learn Python. I tried but was forced back into Pascal due to some glitches in the python routines. I should try it again.

 

I don't work for Nemetschek / VW, but have my own little independent office for drafting, scripting, rendering and teaching in mostly Vectorworks. Since a few years we are adding SketchUp Pro to the stable, but I don't feel that at home in SketchUp yet as I feel in Vectorworks.

 

Be careful with this script. It has not been tested that well. Make sure you keep backup copies.

 

Boh, you should be able to copy the content of the plug-in to a script. Just don't open the file in a text editor but rather in the Plug-in Manager.

 

I have done some more testing:

1 It is no problem to use SetRecord() on the Symbol definition, even though the record already exists on the Symbol Definition.

2 The lines VSave and Vrestore are not necessary, they were leftovers from the scripts previous life.

The version  2 reflects those changes:

 

Move Rec from Inst to Def.vsm version 2.zip

The (Vector)Script Function Reference can be found in the application folder of Vectorworks:VWHelp:Script Refrence:ScriptFunctionReference.html
 

Share this post


Link to post
  • 0

Ok cool. Thanks Gerard. I hadn't imported a plug-in before so have learnt something new today!

Bonus is that it actually works!

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

×