I know I'm a little late to the party on this one but, I tried this on my computer looking for a solution for the boss. It worked great on mine but then when boss man puts it on his it returns an error. I followed the error with exactly what is in the lsp file. I placed the file in the autocad support folder.
Command: a2z_taborder
; error: no function definition: VLAX-GET-ACAD-OBJECT
Command:
(defun c:a2z_taborder (/ tabs tlist newlist) (setq tabs (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))) (vlax-for tab tabs (if (not (= (strcase (vla-get-name tab)) "MODEL")) (setq tList (cons (vla-get-name tab) tList)) ) ) (setq newlist (acad_strlsort tlist)) (vlax-for tab tabs (if (not (= (strcase (vla-get-name tab)) "MODEL")) (vla-put-taborder tab (1+ (vl-position (vla-get-name tab) newlist))) ) ) )
Try adding this at the beginning of the file.
(vl-load-com)
Can't find what you're looking for? Ask the community or share your knowledge.