Jump to content
Developer Wiki and Function Reference Links ×

Databases on the fly


Paolo

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]

Link to comment

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);

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