Jump to content


  • Content Count

  • Joined

  • Last visited


Community Reputation

0 Neutral

About mikeconner

  • Rank

Personal Information

  • Occupation
  • Location
    springfield, mo usa
  1. Yes, that was the problem; someone on the vscript list suggested the same fix (changing the insertchoice counter to r-1 from r) and it worked. I haven't checked to see if the insertchoice index requirements changed from VW 9 to 10 or it just got pickier about it in VW 10. At least it was a quick and easy fix.
  2. I just upgraded to VW 10 and a script that worked in VW 9 is giving me a problem. It uses a custom dialog to present a list of choices to the user; the choices are retrieved from a worksheet. Everything seems to work ok except that the choices listed in the dialog are garbage charcaters. In debugging, the string array used to store the choices for presented lists the proper strings, but the strings presented to the user by the dialog are garbage, e.g. 2?? (should be Millersburg). If selected, the garbage is returned and the script fails. Any help on what's happening. Mac OS X, VW 10.1. The dialog portions of the script are: { Dialog definition function subroutine } FUNCTION Define_Pickquad : INTEGER; VAR dialogID : INTEGER; BEGIN dialogID := CreateLayout('Choose Quad Map',True,'OK','Cancel'); CreateListBox(dialogID,6,16,4); SetFirstLayoutItem(dialogID,6); SetHelpString(1,'Accepts dialog data.'); SetHelpString(2,'Cancels operation without changes.'); SetHelpString(6,'Choose quad map'); Define_Pickquad := dialogID; END; { Dialog driver function subroutine } PROCEDURE Drive_Pickquad(VAR item:LONGINT; data:LONGINT); BEGIN CASE item OF SetupDialogC:BEGIN {populate quad list} for r:=1 to nq do InsertChoice(6,r,quadstr[r]); END; { user selected OK button } 1:BEGIN GetSelChoice(6,0,dvi,mapname) END; { user selected Cancel button } 2:BEGIN nq:=0; END; 6:BEGIN END; END; END; { main body of script }
  3. I have used eps files a great deal since MC 6 for importing drawings into Framemaker. The built-in eps export has always been essentially useless except for very simple drawings due to a number of problems. I haven't tested it much with 9.5.2 as I'm going more towards PDF made with Distiller. The way to get totally reliable eps files (except in rare instances) in my experience is to use the printer driver to print to an eps file with fonts embedded. I am on Mac and use either LaserWriter or Adobe PS driver. Don't know the situation in Windows if that is what you use. Two downsides to this approach are that it outputs the eps as the entire page, which can give you lots of white space around the drawing and the eps may not be editable in other programs (though someone I sent some to was able to edit them in Illustrator, which I don't have). They also are large as they are not binary eps. However, using this method I have no need to edit them for use in FrameMaker, they are the same as the print to a postcript printer.
  4. You might get more help by asking this question on the mailing list. It gets more activity than the board, and there is frequent discussion of ACAD transfers. Subscribe to the list at http://lists.nemetschek.net/archives/vectorworks-l.html
  5. I think this behavior may be a bug, or at least an explained change in the program. I just ran into it myself, importing a tab delimited file from Excel into 9.5.1 under OS X and 9.2.2. The import did not reconize the line endings, so all the numbers were in one row. The same file imported correctly into 8.5.2 under OS 9.2.2. When I changed the line endings to UNIX in BBedit Lite, it imported fine into 9.5.1. I submitted this in a bug report, but haven't heard anything back.
  6. What do mean by "default preferences?" Do you mean settings in the VW and Document preferences or settings (scale, units, etc) in the blank document that opens when you start the program without double clicking on an existing file? What system are you on?
  7. mikeconner


    Loci are nonprinting markers; they only show up on thescreen. The are primarily used as reference points for snapping. I don't know if there is anything they are essential for, but they can be handy. For example, I use them for plotting points read in from x,y,z data downloaded from a transit.
  8. Have any of you using Distiller to create PDFs run into the problem of Distiller not being able to see the PS file because it has no type code? When I go to open a ps file in Distiller, it won't list files created from OS X apps until I use a utility to assign a TEXT type code. Do other people have this happen or am I just lucky?
  9. Yes you can do this with a database set up in a worksheet. There may be other ways, but one way is to give each rectangle a name with a common theme, such rect1, rect2, etc.or room1 etc. or roomkit, roombed1, etc. You get the idea. Then in a worksheet, set up a database row. When asked for the criteria of objects to include, set it for name contains 'rect' or whatever. Then in the first column put =N to get the name, in the second column =Area to get the area. Anytime you change a rectangle or add a new one, choose recalculate in the worksheet menu. See the manual on workseets and databases for more info. Mike
  10. 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}
  11. 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
  12. Can't NNA just post this PDF on the web site for download? Mike Conner
  13. A little more work showed that the problem is with 3D loci. This object always reports x and y relative to the page center, so if you move the origin from there you get x and y values in VectorScript that aren't what you see on screen. Other objects don't behave this way (at least some don't). The script below corrects for this problem. Mike {The script begins below, this is a comment line} procedure coord; var x,y,z,ox,oy:real; i:integer; obj:handle; ofile:string; begin getorigin(ox,oy); obj:=factlayer; PutFile('Output file', ' ', ofile); write('X'); tab(1); write('Y'); tab(1); writeln('Z'); while obj<>NIL do begin i:=GetType(obj); if (i=9) then begin GetLocus3D(obj,x,y,z); x:=x-ox; y:=y-oy; write(x); tab(1); write(y); tab(1); writeln(z); end; obj:=nextobj(obj); end; close(ofile); end; run(coord); {This comment line ends the script}
  14. Barb, This probably has to do with you having used the move page tool at some point while in a view other than top/plan. I'm a little hazy on all the details, but VW in some way relates the origin to the page center (the default). In previous versions, using Move Page at any time caused a shift between the stored coordinates (what you see in a VS export file or what you get with a function like Get3DLocus) and those shown on screen. In 8.5.2, I believe this problem only crops up when you use Move Page in a view other than top/plan (though I'm not certain of this). I know I haven't run into it for awhile even though I do a lot of coordinate work and use the move page tool but I do little 3D work.It may also only be a problem for some types of objects, 3D Locus being one. You might be able to reset things by going to top/plan view, recording the coordinate of a locus from the Info Palette, then use the Set Origin command to reset the origin to page center, then Set Origin again and use the Next Mouse Click Is: option; enter the coordinates of the locus, then snap to the locus after hitting ok. I'm not positve that this will work, but it is worth a try. Should do it on a copy of your work file first as a test. People have been complaining about this for years; it is supposedly fixed completely in VW 9 with its new floating point base. Mike
  15. Glen, Yes, this certainly would be possible, though I don't know if there are any canned scripts to do it that ship with VW. In 8.5.2 or earlier, I would guess that you would have to attach a record format to the loci in which you would have fields for the point number and the description. You could then have a script similar to the one I posted that gets the coordinates of the loci as well as the record information to write to the text file. An alternative would be to attach a record format to the loci and then get the info into a VW worksheet database; you could then just export the worksheet with the menu command. The problem with this is that in 8.5.2, there is no worksheet function for the z value, though there are ones that give you the x and y center. This means you would have to get the z value into the record format first, which could be done manually or with a VectorScript that gets the z value and writes into the a field of the record. I don't know if VW 9 will change this situation. There is another way that would require no additional scripting: just use the script I posted, import the text file into Excel or some other program, and add the point numbers and descriptors there, then export as a file that can be loaded into your total station. The first method would probably be the best; once the record format is attached to the loci and the point number and description entered, you would just have to add a few lines of code to the script I posted to get that info into the exported file.It wouldn't be hard to write a script that went through the 3Dloci, automatically assigned the point number and asked you for a description, then wrote this info to the record. You might try subscribing to the VS mailing list and the general VW mailing list (see the link in my original reply to RLKHydro). You might find someone who has already done this or could tell you if any of the examples that come with VW have this capability. If necessary, I could help you develop the system, I think I've got a some scripts that read out record format information.Feel free to email me directly. Mike michaelconner@smsu.edu


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...