Jump to content
Matster

Highest Record Number

Recommended Posts

I was advised to pop this topic into the Python scripting area, as it's more of a script than a tool!

 

I need a way of finding out what the highest number is of a specific record and then putting it on the drawing (ideally auto updating!)

 

This is for a few things, chair/table number (don' really like the auto creation tool!) and cable numbers on schematics, these are just a couple of current requirement, but i just think it would be really useful!

 

I have little experience with scripting (and non in Vectorwork), so any advice or instruction would be greatly! 😀 

Share this post


Link to post

Hello

 

I think the best way is to create a database and link the database to a symbol. 

 

To Update the Database use a simple script something like this:

(this one is for spaces)

 

import vs

c = ("(PON='Space')")

number = vs.Count(c)

vs.AlrtDialog(number)

vs.SetRecord(DATABASE,number)

 

In the second line you can change your search criteria.

In the last line the script write the number in your database.

 

greetings

 

Silas

 

 

 

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...