Message 1 of 3
MacLee Layout field script - display previous and next layout numbers of current layout.

Not applicable
08-31-2021
06:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Im trying to display the next and previous layout number using Lee Mac's layout field code linked below. Currently, the "lfnumber" command displays the current "sheet number" and was wondering if anyone knows how to take that number and add a 1 or subtract a 1 from it.
For instance, we are on sheet 5 but using, let's say, command "lfnumbernext", it would display "Sheet 6".
The same would go with using, let's say, command "lfnumberprev", it would display "Sheet 4".
This is the link to the full script:
http://www.lee-mac.com/lisp/html/LayoutFieldV1-0.html
This is the command for current layout number:
(defun c:lfnumber ( )
(layoutfield
'(lambda ( obj )
(vla-put-textstring obj
(strcat
"Sheet "
"%<\\AcObjProp Object(%<\\_ObjId "
(LM:objectid (layoutfield:layout obj))
">%).TabOrder>%"
)
)
)
)
)