Jump to content

List classes and layers


Recommended Posts

I didn't see any way to do this with a worksheet but it would be a fairly simple VectorScript. With it you could write the names to a worksheet or text file. One other way that would require more hand work is to export the file to VectorScript, then open that text file in a wordprocessor. You can edit out the other commands to get lists of the classes and layers. Would be easier with a document with no objects.

Mike

Link to comment

Do you know how to create a script to do this? I am not familiar with scripts.

quote:

Originally posted by mikeconner:

I didn't see any way to do this with a worksheet but it would be a fairly simple VectorScript. With it you could write the names to a worksheet or text file. One other way that would require more hand work is to export the file to VectorScript, then open that text file in a wordprocessor. You can edit out the other commands to get lists of the classes and layers. Would be easier with a document with no objects.

Mike

Link to comment

I was about to say that I could write the script for you in about 5 minuts, but teach a man to fish, etc. However, I got curious to see if I could write it in 5 minuts so here it is (see below). I will leave it to you to figure out how to install and run the script (see the manual). When you run it, it will ask for a file name to write the info to and allow you to put it where you want. It is a text file that can be open in any word processor or spreadsheet, or even imported into a VW worksheet.

I do encourage you and all VW users to learn to script. If you go to help in VW, you will open an html file. At the top are links to Vectorscript help: a PDF file language guide and an html function reference. Writing simple scripts like this is easy once you learn a few basic concepts.

Mike

{Script begins on next line}

procedure lycl;

var

lname, clname,ofile:string;

ci,i:integer;

obj:handle;

begin

putfile('Write Class/Layer Info to:',' ',ofile);

writeln('Classes');

ci:=classnum;

for i:= 1 to ci do

begin

clname:=classlist(i);

writeln(clname);

end;

writeln('Layers');

obj:=flayer;

while obj<>NIL do

begin

lname:=getlname(obj);

writeln(lname);

obj:=nextobj(obj);

end;

close(ofile);

end;

run(lycl);

{script ends}

Link to comment

Thanks a million. I will do my best to learn script. I think it would really help me on a lot of things.

quote:

Originally posted by mikeconner:

I was about to say that I could write the script for you in about 5 minuts, but teach a man to fish, etc. However, I got curious to see if I could write it in 5 minuts so here it is (see below). I will leave it to you to figure out how to install and run the script (see the manual). When you run it, it will ask for a file name to write the info to and allow you to put it where you want. It is a text file that can be open in any word processor or spreadsheet, or even imported into a VW worksheet.

I do encourage you and all VW users to learn to script. If you go to help in VW, you will open an html file. At the top are links to Vectorscript help: a PDF file language guide and an html function reference. Writing simple scripts like this is easy once you learn a few basic concepts.

Mike

{Script begins on next line}

procedure lycl;

var

lname, clname,ofile:string;

ci,i:integer;

obj:handle;

begin

putfile('Write Class/Layer Info to:',' ',ofile);

writeln('Classes');

ci:=classnum;

for i:= 1 to ci do

begin

clname:=classlist(i);

writeln(clname);

end;

writeln('Layers');

obj:=flayer;

while obj<>NIL do

begin

lname:=getlname(obj);

writeln(lname);

obj:=nextobj(obj);

end;

close(ofile);

end;

run(lycl);

{script ends}

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...