PDA

View Full Version : How to create a new layout without using active x?


boesiii
2006-11-13, 06:44 PM
Can it be done? I don't want to use active x only because I don't know a lot about it, yet.

rkmcswain
2006-11-13, 06:48 PM
(command "._LAYOUT" "_N" "NewLayoutName")

kpblc2000
2006-11-14, 06:37 AM
<post erased>

rkmcswain
2006-11-14, 01:40 PM
Creating new layer through DXF codes


Check the subject of the post.... ;)

kpblc2000
2006-11-14, 01:50 PM
<post erased>

rkmcswain
2006-11-14, 01:55 PM
The author asked about an opportunity of creation of a new layer without use of activex-functions.

Check the subject of the post again. I don't see the word LAYER at all. ;)

kpblc2000
2006-11-14, 01:58 PM
I'm too stupid today. Could you erase my posts?

peter
2006-11-15, 01:52 PM
(defun GetOrCreateLayout (strLayoutName / objLayouts objLayout)
(setq objLayouts (vla-get-layouts
(vla-get-activedocument
(vlax-get-acad-object)
)
)
)
(if (/= (type (setq objLayout (vl-catch-all-apply 'vla-item (list objLayouts strLayoutName))))
'vla-object
)
(setq objLayout (vl-catch-all-apply 'vla-add (list objLayouts strLayoutName)))
)
objLayout
)