TheSwamp

Code Red => VB(A) => Topic started by: BAshworth on June 21, 2006, 04:30:42 PM

Title: Grrrr.. Arrrrrgh ADT 2004 Display Configurations
Post by: BAshworth on June 21, 2006, 04:30:42 PM
Recently had the chance to don my programmer's hat again, and I am stuck on how to do this better than using SendCommand.

I want to change the active Display Configuration via VBA.

I can pull out the value of the current display config by yanking out the xdata for the active viewport associated with the AEC_DISP_REP_CONFIGURATIONS dictionary, and then getting the handle associated with the 1005 value of AECBASE within that dictionary.

However, the handle won't be static across drawings, so I can't just SetXData back the same way I found the name of it.  Can I?

Any ideas as to how I can do this?  My current method works "SendCommand -aecdisplayconfigsetcurrent"  but a little squirrel once told me not to use SendCommand unless there was no other way of doing it.
Title: Re: Grrrr.. Arrrrrgh ADT 2004 Display Configurations
Post by: David Hall on June 21, 2006, 05:06:10 PM
Hey Bash, great to see you.

I dont have a clue on display configs
Title: Re: Grrrr.. Arrrrrgh ADT 2004 Display Configurations
Post by: BAshworth on June 21, 2006, 05:09:19 PM
Long time no see yourself.

I have no clue either, why I asked :D..

Let me just add, that I am very disappointed in the ADT VBA object model documentation.  It's even worse than vanilla AutoCAD's, and I couldn't believe how bad that was.
Title: Re: Grrrr.. Arrrrrgh ADT 2004 Display Configurations
Post by: Murphy on June 21, 2006, 05:52:26 PM
I have found this site (http://www.cadmin.com/VBA_for_ADT/Introduction.htm) to be of good use and I am using ABS. Hopefully you can find something useful as well.
Title: Re: Grrrr.. Arrrrrgh ADT 2004 Display Configurations
Post by: BAshworth on June 21, 2006, 06:30:04 PM
Yeah, I had found that site.  Kind of where I got info on how to access the name of the current display config.  But his example only queries, doesn't go into how to set it.

Thanks for the reply Murph