Jump to content

control Workspaces

Recommended Posts

On Vw2021, when we run

 EnableDebugMenu(True); or EnableDebugMenu(False);

, then "Debug" Menu turn on or off on the Menu bar of Workspaces.


In this way, can we control our Workspaces by script ?

Share this post

Link to post

Can you rephrase your question? Are you asking how to create or edit a workspace using a script? Or do you want to use a script to execute menu commands?

Share this post

Link to post

Thank you for your message .


I rephrase my question .
I want to know how to add some menus and tools to existing workspaces using the VS script .


I saw new functions about Workspaces
on site : /developer.vectorworks.net/index.php/VS:Vectorworks_2021_New_Functions


If we want edit a workspace, we have to use the new functions ?

Are there any sample script or hint somewhere ?


Initially, I think we would like to do add our menu to all workspaces .
I think so when I saw the EnableDebugMenu command can changes (add and hide) all workspaces .


Thank you .
(A&A Japan)

Share this post

Link to post

I don't believe there is any way to edit all the workspaces at the same time. I think only the current workspace can be edited, but that is just a guess based on a quick read of the Function Reference.


The Enable Debug Menu is a special case in that it can not be added to the workspace through the Workspace Editor and only by hiding/showing via the DebugMenu calls.


I think you will have to look at the very short code snippets on the developer.vectorworks.net web site for information on the new ws2 function calls that were added to VW2021 to see how to edit the workspace.



Share this post

Link to post


We looked
and others .


We tried using them On Vw2021, but could not .


Is there anyone who know how to use these functions
or who have any samples about them ?


    DYNARRAY[] of CHAR:=ws2GetMenuAt(menuPath,index);
    DYNARRAY[] of CHAR:=ws2GetToolAt(toolPath,index);




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.

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