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

0 Members and 1 Guest are viewing this topic.

JEDWARDL

  • Mosquito
  • Posts: 9
Internal Error with VLA-SAVE and VLA-CLOSE
« on: April 25, 2012, 01: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
Illegitemi non carborundum est

alanjt

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

JEDWARDL

  • Mosquito
  • Posts: 9
Re: Internal Error with VLA-SAVE and VLA-CLOSE
« Reply #2 on: April 25, 2012, 05: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
Illegitemi non carborundum est

BlackBox

  • Water Moccasin
  • Posts: 2261
Re: Internal Error with VLA-SAVE and VLA-CLOSE
« Reply #3 on: April 25, 2012, 05: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.
"Potential has a shelf life." - Margaret Atwood

dgorsman

  • Swamp Rat
  • Posts: 1398
Re: Internal Error with VLA-SAVE and VLA-CLOSE
« Reply #4 on: April 26, 2012, 09: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: 4644
  • Standby for witty remark...
Re: Internal Error with VLA-SAVE and VLA-CLOSE
« Reply #5 on: April 26, 2012, 04:34:01 pm »
Are you certain the Document at Index 1 is *not* the active document?
x2
Civil 3D 2011|2012 ~ Windohz 7
Dropbox