Jump to content
Developer Wiki and Function Reference Links ×

How to Call for a menu command?


Recommended Posts

You would normally call menu items with a DoMenuTextByName() call.

I don't think you can use Dimension Exterior Walls, unless you are willing to accept the dialog box opening up in the middle of your script. You can try

DoMenuTextByName('Dimension Exterior Walls',0);

The menu items and group names are found in Appendix H of the VectorScript Appendix (found in the Help files).

Pat

Link to comment

Thank you Pat... the matter is "Dimension Exterior Walls" is not in the appendix.

I got the following error when I try yo call the command with the same script as the one you give me: "Error: DOMENUTEXTBYNAMEEXAM DOMENUTEXTBYNAME - Menu cannot be found. Dimension Exterior Walls"

Is there an other way to reach this command?

Can't we call a script from an other script?

Link to comment
  • 15 years later...

The script works fine for

DoMenuTextByName('Exterior Wall Dimensioner',0);

However when I try to search in Library or Plugins, or just preferences, I can not find in any place the file with that name or any other name similar to Exterior Wall.

VW Script Appendix H shows a list of commands, none of them even close to that name.

(Nothing for Dimension or Exterior or Wall (just wall framer, that is all)

https://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix_H

 

So, my question is

How, Patrick, you were able to find out the right name of the file ?

 

For my work I need to find a way to call the menu command under Modify>Convert>

Stake Object from 3D Locus...

Is there a way to do it?

 

 

 

 

Edited by ashot
Link to comment

Sorry for the delay.  They had the "Univeral Name" of this command which is what is required for the DoMenuTextByName command very well hidden. I had to do some deep digging into the Landmark.vww which is the workspace file. I used a text editor to search in there for all instances of "Stake" when the "Stake Object From 3d Locus…" text wasn't found, I started looking at other commands that had the work Stake. I eventually hit upon:

 

DoMenuTextByName('ConvertToStake',0);

 

  • Like 1
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...