.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Display Config

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
302 Views, 0 Replies

Display Config

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)
) ))
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost