Can someone point me in the right direction? Please? I would like to
convert these lisp functions to .net This is my first atempt at .NET for
autocad, so go easy on me.
Thanks
Matthew
What reference file do I need?
How do I get at the display config inside it?
This function will return the name of the active display configuration
(defun Get_display_cfg (/ adt doc configs actvport cnt n cfg name)
(setq adt (vla-GetInterfaceObject (vlax-get-acad-object)
"AecX.AecArchBaseApplication.5.7");2009
doc (vlax-get-property adt 'ActiveDocument)
configs (vlax-get-property doc 'DisplayConfigurations)
actvport (vlax-get-property doc 'ActiveViewport))
(vlax-get-property (vlax-get-property configs 'ActiveConfiguration
actvport) 'Name)
)
This function wil set the active display configuration.
(defun set_display_cfg (cfgname / adt doc configs actvport cnt n cfg name)
(setq adt (vla-GetInterfaceObject (vlax-get-acad-object)
"AecX.AecArchBaseApplication.5.7");2009
doc (vlax-get-property adt 'ActiveDocument)
configs (vlax-get-property doc 'DisplayConfigurations)
actvport (vlax-get-property doc 'ActiveViewport)
cnt (vla-get-count configs)
n 0 )
(repeat cnt
(setq cfg (vla-item configs n) ;Get a config
n (1+ n)
name (vla-get-name cfg) )
(if (= (strcase name)(strcase cfgname))
(vlax-put-property configs 'ActiveConfiguration actvport cfg)
) ))