Author Topic: Internal Error with VLA-SAVE and VLA-CLOSE  (Read 3471 times)

0 Members and 1 Guest are viewing this topic.

JEDWARDL

  • Guest
Internal Error with VLA-SAVE and VLA-CLOSE
« on: April 25, 2012, 02:15:31 PM »
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

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Internal Error with VLA-SAVE and VLA-CLOSE
« Reply #1 on: April 25, 2012, 05:26:16 PM »
Are you trying to vla-close the active drawing? *doesn't work*
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

JEDWARDL

  • Guest
Re: Internal Error with VLA-SAVE and VLA-CLOSE
« Reply #2 on: April 25, 2012, 06:02:09 PM »
No, I'm trying to save or close the inactive drawings.  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

BlackBox

  • King Gator
  • Posts: 3770
Re: Internal Error with VLA-SAVE and VLA-CLOSE
« Reply #3 on: April 25, 2012, 06:57:26 PM »
Not sure what other code you've got loaded that would lend to the Namespace error, but have you tried supplying the rest of the parameters  to the Save and Close Methods? Just curious.
"How we think determines what we do, and what we do determines what we get."

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Internal Error with VLA-SAVE and VLA-CLOSE
« Reply #4 on: April 26, 2012, 10:14:15 AM »
Are you certain the Document at Index 1 is *not* the active document?
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Internal Error with VLA-SAVE and VLA-CLOSE
« Reply #5 on: April 26, 2012, 05:34:01 PM »
Are you certain the Document at Index 1 is *not* the active document?
x2
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox