Jump to content
Sign in to follow this  
Paolo

Databases on the fly

Recommended Posts

Is there a way to create via VectorScript a database on the fly (if it is not already in the document) or, as a second chance, import it from a template document.

The first solution is available with WorkSheets (CreateWS), the second is available for Symbols (CopySymbol). I've not found nothing similar for Databases.

Can someone help me? Thanks!

[Confused]

Share this post


Link to post
Guest

You can create a database row within a VectorWorks worksheet by using the SetWSCellFormula vectorscript function. Pass 0 as the column argument to set the database formula for a row. See example below:

procedure createdb;

var

theWS : HANDLE;

formula : STRING;

begin

theWS := CreateWS('my WS', 1, 1);

formula := '=DATABASE((T=RECT))';

SetWSCellFormula(theWS, 1, 0, 1, 0, formula);

formula := '=T';

SetWSCellFormula(theWS, 1, 1, 1, 1, formula);

end;

run(createdb);

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.

Sign in to follow this  

 

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