Jump to content
Developer Wiki and Function Reference Links ×

Domenutextbyname selector for DWG import


Recommended Posts

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

Link to comment

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

Link to comment

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

Link to comment

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

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