Visual LISP, AutoLISP and General Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Getting to many viewports -- Iterating through viewPorts on a specific layout .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I am writing some AutoLisp routines and I am doing the following :
; the layout parameter is a vla-object of type of a layout
(defun-q get-ViewPorts (Layout / LayoutBlock ViewPorts)
(setq LayoutBlock (vla-get-Block layout))
(vlax-for i LayoutBlock
(if (= "AcDbViewport" (vla-get-objectName i ))
(setq viewPorts (cons i viewPorts))
)
)
viewPorts
)
The problem is that I am getting one viewport too many - if there are no viewports I get one , if there is one I get two etc.... I am guessing the layout itself or any current view is some sort of a AcDbViewPort ~ how do I 'filter ' it out .
Thanks , Jonathan
Re: Getting to many viewports -- Iterating through viewPorts on a specific layou
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
The paper space has a viewport itself so if you want the number of viewports subtract the total with one.
The first viewport in each layout is the layout itself.
JTB World - Software development and consulting
Specialities: AutoCAD, AutoCAD Architecture and Revit
http://www.jtbworld.com
JTB FlexReport - network license reports
http://www.jtbworld.com/jtbflexreport/index.htm
Re: Getting to many viewports -- Iterating through viewPorts on a specific layou
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

