Jump to content

worksheets and schedules

Recommended Posts

OK, how about a partial solution. The attached script will create a worksheet showing both the display names and the record/field name needed to paste into a database header row in a worksheet. The created worksheet will be named with the name of the PIO and the date/time it was created (this is so I don't confuse myself if I am creating new PIOs). The Record.Field are enclosed in single quotes so you can just copy and paste the entire field without having to worry about spaces in the names.

Please use as you see fit.


Procedure GetPIORecordFields;

{Creates a worksheet showing the display and field names}

{for the first selected object on the active layer}

{Useful for determining the record.field names required}

{for use in a worksheet.}

{January 30, 2008}

{? 2008, Coviana, Inc - Pat Stanford pat@coviana.com}

{Licensed under the GNU Lesser General Public License}

Var H1 ,H2 :Handle;

S1,S2,S3,S4 :String;

N1,N2 :Integer;

WSH :Handle;

B1 :Boolean;



H2:=GetRecord(H1,1); {get a handle to the first record}

If H2 <> Nil then

Begin {If a record exists then create worksheet}





WSH:=CreateWS(Concat(S1,' ',Date(2,1)),N1+2,2);




SetWSCellFormula(WSH,1,1,1,1,Concat('Parameter Fields for PIO: ',S1));

SetWSCellFormula(WSH,3,1,3,1,'Display Name');

SetWSCellFormula(WSH,3,2,3,2,'Cell Formula');

While N2<=N1 Do

Begin {populate the worksheet with all the fields}













Link to comment


Thanks again.

I tried the script and it works great.

It took me a minute to figure out that it wouldn't work on PIO's that were inserted into walls, like doors or windows, but dragging them free of the wall solved the problem.

A great advantage to having the info on a worksheet is that you can see it WHILE you are working on another worksheet, unlike using the PlugIn Editor which will not allow you to work with anything else while it is open, meaning that you must write down or memorize the info that you seek.

I think this is a huge improvement.

Link to comment


Come back after a day and a hugh thread - and all good stuff, which at the mo I do not understand but I am gratful for the input and will give it a go. It will take at least a day to play around with it and try it out and set it up as our office template.

But I suppose that's my point to the average user this sounds so complicated and not user friendly that it is not used. I do not know the first thing about scripts and I feel I would have to be a CAD programmer to really do it. The VW help section on worksheets and schedules is poor and so minimal.

NNA are pushing BIM but if its hard to understand and use then it will not be used and fail. NNA should backing up the push for BIM with workable templates and not just US based but other countries as well.

Look at Excel, there are hundreds of templates easily available and easy to adapt.

Link to comment


Don't confuse scripting with the worksheets and schedules. You don't need to write scripts to use worksheets. You just need to follow Wes's directions and the Help files to modify the schedules that are provided. It's convoluted to say the least, especially if you don't do it often, but it isn't terribly hard. You should definitely keep trying.

The script that Pat provided is a completely different thing. It's like learning another language. I've looked longingly at those scripts but I just don't have the time to devote to learning it.

Link to comment
  • Vectorworks, Inc Employee

boxjoint, pat and all,

There is another solution for accessing PIO names that doesn't involve using the VS Plug-in editor or scripting.

You can do this directly from the worksheet using the Paste Criteria command.

Proceed as follows:

- Enter the equal sign in the formula bar

- Click on the "Paste Criteria..." command in the worksheet menu

- The Paste Attributes dialogs opens , then click on the 'Custom' button.

- Now in the Criteria dialog, select the Field Value criterion, pick your PIO field and make sure you set the criteria operator to 'NONE' (third pulldown menu).

- Click OK and you are done.

We are well aware that accessing PIO names from the worksheet isn't straightforward and intuitive. This area is on the radar and we are working on better solutions.



Link to comment
  • 6 months later...

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.

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.

  • Create New...