BillW Posted May 30, 2008 Share Posted May 30, 2008 I am using VW2008 PC and am trying to write a wrapper script to menu command 'Import Single DXF/DWG File' I am not having much luck. The VS Reference suggests using a selector 'Import DXF/DWG' but when I try using both of the above as menu command selectors in Domenutextbyname I get an error - code shown below >>>> Error: TEST DOMENUTEXTBYNAME - Menu cannot be found. Import Single DXF/DWG File >>>> The menu entry does exist in the current workspace procedure test; begin domenutextbyname('Import Single DXF/DWG File',0); end; run(test); Any ideas? While I am at it the 'Export DXF/DWG' also doesnt work - again any ideas? Thanks in advance Bill Wood Quote Link to comment
Pat Stanford Posted May 31, 2008 Share Posted May 31, 2008 I have not been able to make these work either. I actually can't make any of the import functions work. I know that there were some changes made to support vslibrary type files in VW2008, but none of these objects are part of a vslibrary. Does anyone know of a way to identify the "internal VectorWorks menu item name" other than going by what is listed in the VS Appendix? Pat Quote Link to comment
islandmon Posted May 31, 2008 Share Posted May 31, 2008 There could be a simple rule ... anything that is in the VW Plug-ins directory is addressable by VS >Handles... whereas commands to the VW dylibs require SDK protocols. ??? Quote Link to comment
Pat Stanford Posted June 1, 2008 Share Posted June 1, 2008 That's not what the docs say. It says that for VSM files, you have to use the internal name, and that for VS plug-ins you have to use the file name. I don't know how to lookup the internal name if it is not in the appendix, and I tried the file name and still did not have any luck. Hmmm, maybe the file name with the .vsm on it? Be right back... Well you don't need the .vsm, but you do need to use the file name. I could have sworn I tried that yesterday. DoMenuTextByName('Import Single DXFGDWG File',0); DoMenuTextByName('Import DXFDWG',0); Both work for me now. I have crashed and had to reboot the computer between then and now. Anyone else? Pat Quote Link to comment
BillW Posted June 1, 2008 Author Share Posted June 1, 2008 Pat - Thanks very much - just what I wanted. The line should read without the extra G though DoMenuTextByName('Import Single DXFDWG File',0); I agree with the sentiments that you should be able to interrogate the internal constants. I have used both Sketchup Ruby and Maxscript which both have an inspect mechanism. Documentation invariably has errors. Thanks Bill Wood Quote Link to comment
Recommended Posts
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.