Author Topic: AutoCAD Architecture 2009 - DisplayPreferences  (Read 1764 times)

0 Members and 1 Guest are viewing this topic.

jbuzbee

  • Swamp Rat
  • Posts: 851
AutoCAD Architecture 2009 - DisplayPreferences
« on: March 30, 2009, 03:15:24 PM »
Code: [Select]
(vlax-dump-Object(vla-get-display(vla-get-preferences acadObj)))
Quote
;   DockedVisibleLines = 2
;   GraphicsWinLayoutBackgrndColor = unsupported result type: 19
;   GraphicsWinModelBackgrndColor = unsupported result type: 19
;   HistoryLines = 400
;   ImageFrameHighlight = 0
;   LayoutCreateViewport = -1
;   LayoutCrosshairColor = unsupported result type: 19

 :-o  :x  :realmad:
James Buzbee
Windows 8

Jeff_M

  • King Gator
  • Posts: 4100
  • C3D user & customizer
Re: AutoCAD Architecture 2009 - DisplayPreferences
« Reply #1 on: March 30, 2009, 03:56:26 PM »
What, the unsupported result type?

Just use the (vlax-variant-change-type var type)....
Code: [Select]
_$ (setq displayprefs (vla-get-display (vla-get-preferences (vlax-get-acad-object))))
(setq cursor (vlax-get-property displayprefs 'ModelCrosshairColor))
#<VLA-OBJECT IAcadPreferencesDisplay 24ee104c>
#<variant 19 16777215>
_$ (setq cursor (vlax-variant-change-type cursor vlax-vblong))
#<variant 3 16777215>
;;with this known type variant you can edit as you wish, then convert it back to the type 19
_$ (setq cursor (vlax-variant-change-type cursor 19))
#<variant 19 16777215>
_$ (vlax-put-property displayprefs 'ModelCrosshairColor cursor)
nil

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: AutoCAD Architecture 2009 - DisplayPreferences
« Reply #2 on: March 30, 2009, 04:04:29 PM »
I tried that at first and couldn't get it to work.  I see now I was doing it wrong!

Thanks Jeff.
James Buzbee
Windows 8