Jump to content
  • 0

Write record information to symbol


Samuel Derenboim

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.

  • Like 1
Link to comment

13 answers to this question

Recommended Posts

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

Link to comment
  • 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.

Link to comment
  • 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

  • Love 1
Link to comment
  • 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?? 🤓😇

Link to comment
  • 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.

Link to comment
  • 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

Link to comment
  • 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?

Link to comment
  • 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
Link to comment
  • 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.

Link to comment
  • 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
Link to comment
  • 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
 

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