TheSwamp
Code Red => VB(A) => Topic started 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.
-
Hey Bash, great to see you.
I dont have a clue on display configs
-
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.
-
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.
-
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