Jump to content
GioPet

DoMenuTextByName can't call menu command

Recommended Posts

Hi, 

 

I am trying to call the function 'Site Model from Source Data...' found under the menu AEC>Terrain>

 

I haven't been able to figure out how to call this using vs.DoMenuTextByName.

Doing some digging, I've noticed that in the Workspace Editor the function is 'hidden' under the command 'Site Model Processor'

 

Does anyone have any idea on how to go about this?

Thank you!

Share this post


Link to post

Hi Nicolas,

 

thank you for the response but unfortunately that doesn't solve it - i've tried with several indexes.

 

Based on Vectorscript Function Reference, Terrain is the submenu so the following should work:

vs.DoMenuTextByName('Terrain',1)

 

But it doesn't work either..

 

Edited by GioPet
typo

Share this post


Link to post

Hi,

 

I'm no expert when it come to scripting (just like to dabble) however I'm also intrigued by the batch tool allocation you're referencing in the menu structure as I struck it yesterday when looking at Model>Create Animation (which is similar to your 4 submenu items..

 

As noted in your first post the menu item 'Site Model Processor' add 4 new menu items - including your desired 'Site Model form Source Data...'.

 

I also like you cannot call the menu item; by name, by a subset of Terrain, by a subset of Site Model Processor.

 

I recall vaguely some of the functions were available in the DTM section of the Vectorworks Function Library but I can't find them anymore listed there. Additionally I suspect this subset of scripts references a Python Library set (most probably Site-Packages in your python local folder) and therefore Vectorworks probably has a little trouble accessing it without a few other elements - probably activated within the same menu set.

 

I'm sure some script wizard will have a work around however I'm wondering in what context you're planning to call this function as I don't know how you're going to traverse the pop-up dialog which appears - unless you're planning to power through with defaults in some sort of automated Multi-Site Model creation environment (which is cool, just outside the norm).

 

Interested if someone finds a Menu call which works.

 

J

Share this post


Link to post

There is a list of DoMenuTextByName submenus in the Vectorscript Appendix, but Site Model Processor is not one of the options.

Share this post


Link to post

Hi Pat, 

 

Thanks for clarifying - does that mean there is no way to call the function 'Site Model from Source Data'?

 

I've been looking to test calling the actual name of the plugin, but I can't even identify it...

 

As part of a wider function, what I'm trying to achieve is to call up the 'site model' dialog to then generate a 3d terrain from selected 3D locus points.

 

Any alternative solutions? 

Edited by GioPet
Missing text

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.


 

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