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

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

 

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.

×