TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: roy_043 on March 03, 2015, 09:32:29 AM
-
Is there a way to retrieve the PS viewport (AcDbViewport) status in Visual Lisp? I am looking for the VL equivalent of group code 68. I want to determine the active viewport on a layout in an objectdbx drawing.
-
According to the object model,
ActivePViewport Property
Specifies the active paper space viewport for the drawing.
See Also | Example
Signature
object.ActivePViewport
object
Document
The object or objects this property applies to.
ActivePViewport
PViewport object; read-write
The active paper space viewport.
-
The ActivePViewport property is very close to what I need, thanks for pointing it out hermanm. The problem is that there is only one ActivePViewport for the entire document. What I am looking for is a way to identify the AcDbViewport that will become the ActivePViewport when you switch to a layout. These viewports have a group code 68 value of 1.
In 'classic' Lisp:
(sslength (ssget "_X" '((0 . "VIEWPORT") (68 . 1)))) => equals number of PS layouts.
-
The ViewportOn property of the AcDbViewport is another place to look. But it only holds the on/off 'part' of the group code 68 value...
-
Is there a way to retrieve the PS viewport (AcDbViewport) status in Visual Lisp? I am looking for the VL equivalent of group code 68. I want to determine the active viewport on a layout in an objectdbx drawing.
The DXF data is usually still available through ObjectDBX; a quick test confirms this.
-
The DXF data is usually still available through ObjectDBX; a quick test confirms this.
I feel silly now. Somehow I made the assumption that (entget) would not work in an objectdbx context. Thank you very much Lee!
-
The DXF data is usually still available through ObjectDBX; a quick test confirms this.
I feel silly now. Somehow I made the assumption that (entget) would not work in an objectdbx context. Thank you very much Lee!
No worries Roy! :-)
-
Using entget does work on ObjectDBX docs and has proven reliable. However, never, ever perform entmods or entupds on ObjectDBX docs. Instant dwg corruption. There was a discussion on this topic 10+ years ago.