- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Just upgraded from 2022 to 2024 and one of my LSP routines is failing to perform as it did. I cannot figure out how to make it right again.
Setup a drawing with 3 layouts and name them as C-000; C-002; C-004
Select layout C-002 and run this code. (it is a snippet of the LSP).
(setq SYS:CURTAB (getvar "CTAB"))
(setq STR:CURTAB (strcat "C-00" (itoa (1+ (atoi (substr SYS:CURTAB (+ 2 (vl-string-search "-" SYS:CURTAB))))))))
(command "layout" "c" SYS:CURTAB STR:CURTAB)
The result is the new layout tab is inserted BEFORE the current tab.This make the order C-000; C-003; C-002; C-004. In 2022 it was inserted AFTER. Making it make the order C-000; C-002; C-003; C-004.
If 1+ is changed to 1- to decrease the number so inserting before makes sense, then the new tab is inserted AFTER the current layout. Making the order C-000; C-002; C-001; C-004.
Since "command 'layout' " does not have the "insert before sheet" as the dialog has, what controls if the new sheet is inserted before or after the current tab?
Windows 10 Pro, x64, Nvidia Quadro P1000
Intel Core i9-11900k; 3.50GHz, 32 GB RAM, 500GB WD BLACK M.2
Solved! Go to Solution.