Author Topic: Xref Manager  (Read 1080 times)

0 Members and 1 Guest are viewing this topic.

cadpro

  • Newt
  • Posts: 131
Xref Manager
« on: December 13, 2006, 04:00:01 am »
Hi all,

I have a VBA routine that runs from Acaddoc.lsp, so that this routine runs with every document while opening. But when I try to open an xref from the xref manager, AutoCAD command window is stuck with the command 'Macro name:'. Is there any workout for this problem?

Thanks

Arizona

  • Water Moccasin
  • Posts: 2342
Re: Xref Manager
« Reply #1 on: December 13, 2006, 06:38:41 am »
Maybe posting some code would help us to see what/where the error is and what a possible solution might be. :-)
Although the error may be coming from the vbarun command not receiving the right information to find the sub routine.
« Last Edit: December 13, 2006, 06:42:13 am by Arizona »
I am still determined to be cheerful and happy, in whatever situation I may be; for I have also learned from experience that the greater part of our happiness or misery depends upon our dispositions, and not upon our circumstances. - Martha Washington

cadpro

  • Newt
  • Posts: 131
Re: Xref Manager
« Reply #2 on: December 13, 2006, 07:01:36 am »
This is what happens when I normally open a file.

AutoCAD Express Tools Copyright 2002-2004 Autodesk, Inc.
-vbarun
Command:
Macro name: C:\Program Files\Autodesk Building Systems
2006\Support\Test.dvb!Test
Command:
Autodesk Architectural Desktop menu utilities loaded.

This works fine.

But when I open an xref from the Xref Manager using the Open button, it first goes to the original dwg and the command line stays stuck with the line "Macro name:". But if I switch to the opened xref, that is opened fine.

Thanks

Arizona

  • Water Moccasin
  • Posts: 2342
Re: Xref Manager
« Reply #3 on: December 13, 2006, 07:08:21 am »
Try putting quotes around your path like this.

Example: -vbarun "C:\Program Files\Autodesk Building Systems
2006\Support\Test.dvb!Test"
« Last Edit: December 13, 2006, 07:10:43 am by Arizona »
I am still determined to be cheerful and happy, in whatever situation I may be; for I have also learned from experience that the greater part of our happiness or misery depends upon our dispositions, and not upon our circumstances. - Martha Washington

Chuck Gabriel

  • Water Moccasin
  • Posts: 2008
Re: Xref Manager
« Reply #4 on: December 13, 2006, 07:55:53 am »
I have had similar symptoms before, when I tried to load and run a VBA macro from the s::startup routine.  IIRC it was a routine to load standard layers from a config file.  The only solution I could find was to replace the call to the macro with lisp code that did the same as the macro.  I hope you are able to manage better though.  Good luck.
Windows 7 Ultimate x64 and no CAD software whatsoever

cadpro

  • Newt
  • Posts: 131
Re: Xref Manager
« Reply #5 on: December 16, 2006, 01:56:18 am »
Chuck,

Thanks for the reply. Is there any option I can stick on to VBA as I prefer using VBA instead of lisp.

Given below is the command lines from the AutoCAD Text Window on each kind of drawing open.

Parent file before opening Xref:

Opening an AutoCAD 2004 format file.

Resolve Xref "TitleA0": C:\test\TitleA0.dwg
"TitleA0" loaded.
"TitleA0" reference file may have changed since host drawing was last
saved.
Regenerating layout.
Regenerating model.

AutoCAD Express Tools Copyright 2002-2004 Autodesk, Inc.
-vbarun
Command:
Macro name: C:\Program Files\Autodesk Building Systems
2006\Support\Test.dvb!Test
Command:
Autodesk Architectural Desktop menu utilities loaded.

Parent file after opening Xref:

Opening an AutoCAD 2004 format file.

Resolve Xref "TitleA0": C:\test\TitleA0.dwg
"TitleA0" loaded.
"TitleA0" reference file may have changed since host drawing was last
saved.
Regenerating layout.
Regenerating model.

AutoCAD Express Tools Copyright 2002-2004 Autodesk, Inc.
-vbarun
Command:
Macro name: C:\Program Files\Autodesk Building Systems
2006\Support\Test.dvb!Test
Command:
Autodesk Architectural Desktop menu utilities loaded.
Command: xr XREF
Command:
Command:
Macro name:

Opened Xref:

Opening an AutoCAD 2004 format file.
Regenerating model.

AutoCAD Express Tools Copyright 2002-2004 Autodesk, Inc.
-vbarun
Command:
Command: C:\Program Files\Autodesk Building Systems
2006\Support\Test.dvb!Test Unknown command "C:\PROGRAM
FILES\AUTODESK BUILDING SYSTEMS 2006\SUPPORT\TEST.DVB!TEST". 
Press F1 for help.

Command:
Autodesk Architectural Desktop menu utilities loaded.

This is the whole problem. I know I have done some wrong method to load the dvb. If anybody can help me to find out where I went wrong, please help.

Thanks

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 10709
  • class keyThumper<T>:ILazy<T>
Re: Xref Manager
« Reply #6 on: December 16, 2006, 04:06:01 am »
What is in Acaddoc.lsp to run the dvb ?
What is in the TEST.DVB ?

post the code.

information is needed


What do you mean by 'Opened Xref:'  ??


Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate<--

cadpro

  • Newt
  • Posts: 131
Re: Xref Manager
« Reply #7 on: December 17, 2006, 03:28:06 am »
Here is the link to a thread I found in Autodesk discussion forum which is similar to the problem I am facing.

http://discussion.autodesk.com/thread.jspa?messageID=4115899

Thanks
« Last Edit: December 17, 2006, 03:30:20 am by cadpro »

Bryco

  • Water Moccasin
  • Posts: 1708
Re: Xref Manager
« Reply #8 on: December 17, 2006, 11:11:53 am »
Cadpro have you tried loading the dvb without lisp and using the application begin open event?
I use the acad.dvb method of loading and with beginopen I did receive the msgbox message while opening through the xref man which seems to mean it works fine.
However I do notice the drawing starts opening up then flickers back to the old drawing, then opens up, so this command seems to do a partial open first or something. Perhaps here is where the lisp is lost. I also had an error  setting a layer to previous, which is part of an escape routine. I brought this up as it is a part of the document level begincommand/endcommand sequence that uses thisdawing as its base. As the drawings switch, so does "thisdrawing" and here is where a command can begin in one drawing and end in another.

cadpro

  • Newt
  • Posts: 131
Re: Xref Manager
« Reply #9 on: December 20, 2006, 02:12:59 am »
Bryco,

My whole aim is to run the dvb on all documents. That is why I added the vbarun command to the acaddoc.lsp file. So if I load the dvb without lisp, this purpose will not be fulfilled. I tried changing the name of the dvb to acad.dvb and loaded it without the lisp, but it loads only once when the application starts up. It will not run on every opened document.

Thanks

Arizona

  • Water Moccasin
  • Posts: 2342
Re: Xref Manager
« Reply #10 on: December 20, 2006, 06:10:41 am »
Can you post the part of your acaddoc.lsp file that shows the vbarun statement? :-)
I am still determined to be cheerful and happy, in whatever situation I may be; for I have also learned from experience that the greater part of our happiness or misery depends upon our dispositions, and not upon our circumstances. - Martha Washington

Bryco

  • Water Moccasin
  • Posts: 1708
Re: Xref Manager
« Reply #11 on: December 20, 2006, 10:18:23 pm »
Cadpro have you tried loading the dvb without lisp and using the application begin open event?