PDA

View Full Version : Export Layout Tab Names



avdesign
2007-11-08, 05:07 PM
Hey everybody,
I did a search already and didn't find anything related to what I'd like to do.

What I want to do is export the name of a single layout tab or multiple layout tabs to a text file. The one thing I don't want to use is Sheet set Manager. I there a way to do this or am I SOL.

Ed Jobe
2007-11-08, 06:02 PM
Nothing built into acad, but lisp or vba can do it.

rkmcswain
2007-11-08, 06:25 PM
Here is a quick routine to do this....



(setq fn (strcat (getenv "temp") "\\" "layoutlist.txt")
fp (open fn "w")
)
(vlax-for x
(vla-get-Layouts
(vla-get-ActiveDocument
(vlax-get-acad-object)
)
)
(princ (vla-get-Name x) fp)
(princ "\n" fp)
)
(close fp)
(startapp "notepad" fn)

avdesign
2007-11-08, 06:51 PM
Oh freakin' Sweet :):):)
Thanks for that chunk of code.

rkmcswain
2007-11-09, 01:52 AM
No problem. Have a good one.

rmk
2007-11-09, 02:31 PM
Is that code vba or lisp? How would I save it and activate it?

rkmcswain
2007-11-09, 02:37 PM
Lisp.
Copy it to Notepad.
Save as a file like "listlayouts.lsp" - to a directory that is in your support file search path
When you need to run it, just load it like this (load "listlayouts")

rmk
2007-11-09, 02:38 PM
Thanks R.K. I appreciate the info.
Robert

Does it work with acad 2008 vanilla. I copied it and saved it in the support directory, but when i loaded it i got this error: ; error: no function definition: VLAX-GET-ACAD-OBJECT. Not savvy with lisp, so i have no idea what this means.

rkmcswain
2007-11-09, 02:56 PM
Sorry about that. Add (vl-load-com) to the top of the file.

rmk
2007-11-09, 03:11 PM
Thanks, that worked just fine.

dhf000
2018-11-28, 12:51 PM
Thank you for your helpful post. The resulting layout tab names are in alphabetical order, is there a way to get results listed in same order as shown in drawing?

Tom Beauford
2018-11-28, 01:48 PM
Thank you for your helpful post. The resulting layout tab names are in alphabetical order, is there a way to get results listed in same order as shown in drawing?
(layoutlist)

BlackBox
2018-11-28, 02:16 PM
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/i-need-a-list-of-selected-layout-tab-names/m-p/4524295#M315919



<snip>

... consider this pseudo-named, custom LayoutListSelected function:

https://forums.autodesk.com/t5/image/serverpage/image-id/66047i8D3A6378A42B8471/image-size/original?v=mpbl-1&px=-1
https://forums.autodesk.com/t5/image/serverpage/image-id/66049iCE8F85380C050BA0/image-size/original?v=mpbl-1&px=-1
https://forums.autodesk.com/t5/image/serverpage/image-id/66051i87EE88AAB6A5E115/image-size/original?v=mpbl-1&px=-1

<snip>

pradeepgds782441
2019-05-21, 06:28 AM
Hi Dear,

this works fine and great. thanks for this code.

can u please update this code as few implements required for me. if possible

1. Implement the command name, since i can use when it required by loading the lisp in startup suite
2. can it be export in .csv format with the file name and layout name.
3. the exported .csv file need to autosave in the same location where the cad files is there.(it should not open and show the result)

it would be more helpful for me if these are implemented in this code.

BlackBox
2019-05-21, 02:25 PM
this works fine and great. thanks for this code.

can u please update this code as few implements required for me. if possible

1. Implement the command name, since i can use when it required by loading the lisp in startup suite
2. can it be export in .csv format with the file name and layout name.
3. the exported .csv file need to autosave in the same location where the cad files is there.(it should not open and show the result)

it would be more helpful for me if these are implemented in this code.

Thanks for your interest.

The code is intended to return a list of strings, with which you can do what you like.

If you'd like this exported to .CSV, please feel free to do that on your own, using the WRITE-LINE, etc File functions.

Cheers

pradeepgds782441
2019-05-22, 04:21 AM
Thanks for your interest.

The code is intended to return a list of strings, with which you can do what you like.

If you'd like this exported to .CSV, please feel free to do that on your own, using the WRITE-LINE, etc File functions.

Cheers

Hi,
if i am a coding specialist i could do this for sure. ok that's fine. let me handle what i need.
thanks for your consideration