Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Internal Error with VLA-SAVE and VLA-CLOSE

4 REPLIES 4
Reply
Message 1 of 5
jleavitt
932 Views, 4 Replies

Internal Error with VLA-SAVE and VLA-CLOSE

When I try to run this code:

 

(VLA-SAVE (VLA-ITEM (VLA-GET-DOCUMENTS (VLAX-GET-ACAD-OBJECT)) 1))

 

or

 

(VLA-CLOSE (VLA-ITEM (VLA-GET-DOCUMENTS (VLAX-GET-ACAD-OBJECT)) 1))

 

where the item returned from the vla-item routine is an inactive, but open drawing I get the following message:

 

INTERNAL ERROR: VL namespace mismatch

 

and I have to close AutoCAD using Windows Task Manager.

 

The VLA-SAVE and VLA-CLOSE commands work with an inactive, open, but empty drawing, so why doesn't it work with the ones that have data in them?

 

Thanks,

 

J Leavitt

J Leavitt, PLS
Land Surveyor
Bureau of Land Management
California State Office
4 REPLIES 4
Message 2 of 5
dbroad
in reply to: jleavitt

I don't recommend using lisp to close the current drawing anyway so it is probably a good thing the error happens.  What are you trying to do?  Are you scripting multiple drawings?  If so, consider using objectdbx or scriptpro.  Avoid closing the current drawing with lisp because the program has not finished its execution and loses its namespace.

Architect, Registered NC, VA, SC, & GA.
Message 3 of 5
jleavitt
in reply to: dbroad

No, I'm trying to save or close the inactive drawings, not the active one.

 

I have written routines that modify dictionary entries and Xdata in the inactive documents based on editing in the active drawing and I'm looking for a reliable way to save those edits.  I could always take the long way around and visit each of the documents individually, but it would be so much more convenient to be able to save all the edits at once.

Express Tools has that capability, but I get the same error when I try to use it.

 

Thanks,

 

J Leavitt

J Leavitt, PLS
Land Surveyor
Bureau of Land Management
California State Office
Message 4 of 5
dbroad
in reply to: jleavitt

Are you sure that item 1 is not the current drawing? Are you sure that item 1 exists?  It won't if AutoCAD only has 1 drawing open.

 

As you close drawings, the index number of a particular drawing may change.  For instance, if you close item 1 of the docs collection, item 2 becomes item 1 but item 0 would not change.

 

 

Architect, Registered NC, VA, SC, & GA.
Message 5 of 5
jleavitt
in reply to: dbroad

No, the indices are all correct.  That was one of the first things that I checked.  I have a suspicion that the problem is drawing-specific, possible due to an error in the database. perhaps.

 

Thanks,

 

J Leavitt

J Leavitt, PLS
Land Surveyor
Bureau of Land Management
California State Office

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost