jhutchison Posted April 2, 2001 Share Posted April 2, 2001 Is there a way to list the classes and layers in a file using VW8.5.2? I'm on Mac OS 9.1. Quote Link to comment
mikeconner Posted April 3, 2001 Share Posted April 3, 2001 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 Quote Link to comment
dlstudios Posted April 3, 2001 Share Posted April 3, 2001 If you are using the layers and classes from a setup assistant aren't they already in a worksheet in the templates folder? Try opening on the these files and then opening the worksheet that's contained in the file. Quote Link to comment
jhutchison Posted April 5, 2001 Author Share Posted April 5, 2001 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 Quote Link to comment
mikeconner Posted April 5, 2001 Share Posted April 5, 2001 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} Quote Link to comment
jhutchison Posted April 5, 2001 Author Share Posted April 5, 2001 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} Quote Link to comment
Recommended Posts
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.