Author Topic: Xref Manager  (Read 3643 times)

0 Members and 1 Guest are viewing this topic.

cadpro

  • Guest
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

  • Guest
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 »

cadpro

  • Guest
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

  • Guest
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 »

Chuck Gabriel

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

cadpro

  • Guest
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: 11654
  • 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:'  ??


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

cadpro

  • Guest
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: 1882
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

  • Guest
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

  • Guest
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? :-)

Bryco

  • Water Moccasin
  • Posts: 1882
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?