Jump to content

Fuge

Member
  • Posts

    158
  • Joined

  • Last visited

Everything posted by Fuge

  1. Can you guys add a GetProjection(); call to vectorscript to go along with SetProjection(); There's currently no way to determine whethera user is in Top or Top/Plan view. When writing scripts that convert to lines that's important to know. ThanksDave
  2. Chrissy, VectorWorks has 2 applescript commands"Do Script" , for running a vectorscript and "translate" . Translate is suppose to open an older document and translate it to the new version and save it under a new name. Nowwhether it will convert a MC7 document I'm not sure. There's an applescript that converts MC6 files to MC7 here.http://www.nemetschek.net/downloads/MC7/mcupdates.htmlYou could probably update that script for your needs if your lucky. Dave
  3. You can write something to print multiple layers or sheets within the active document, BUT you have to be willing to hit the "OK" button everytime the print dialog appears, which is really not very desirable. You cannot print mulitple files however,or batch files to save them as DWG files. It would be nice to see vectorscript reachoutside the active document and allowscriptors to suppress print and other dialogs.Something like what Filemaker does would be a step in the right direction. If your intent is to print drawings within adocument, let me know more exact what you what to do, I'll be glad to help you out. Dave
  4. Check out this link. It's Print2PDF forWindows. http://www.software602.com/products/printpack/pdf.html Dave
  5. I don't have a solution for you , but I can confirm what your seeing, because I've seen it as well. I've tried everything to work around it without any luck. It does seem that after a certain number of classes the sub-menusjust stop getting formatted correctly. Dave
  6. The vectorscript Editor is part of Vectorworks 8.5, however as your seeing it can only handlea script up to 32k in size on Mac. You would also need to edit plug-ins throught the "Create Plug-in..." menu. Find a friend with Vectorworks 8.5 on windows. VectorWorks 8.5 on windows can edit vectorscripts up to 64k. Vectorworks 9.x no longer has this vectorscript size limitation on either platform.An upgrade may be your best bet. HTHDave
  7. Lonnie, Most likely when you did a copy and pasteto grab the script you may have either missedpart of the script or there may be a hiddencharacter that is causing the script not to run.One tiny thing being off will cause a problem. That's my best guess.Dave
  8. If your expecting the tool to work as a button,do something simply by clicking on it, it's currently not do-able. Tools requires anaction by the user, like clicking on an object or down on the screen, etc.. Dave
  9. Yes Dave---------------Procedure Showallclasses;VAR numberofclasses,ClassIndex:LONGINT;ClassVisibility:INTEGER;ClassName:STRING; BEGIN numberofclasses:=ClassNum; ClassIndex:=0; FOR ClassIndex := 1 TO numberofclasses DO BEGIN ClassName:= ClassList( ClassIndex ); ClassVisibility:= GetCVis( ClassName ); IF ClassVisibility = -1 THEN BEGIN ShowClass( ClassName ); END; END; END;RUN ( Showallclasses );
  10. Give this a try.Dave Procedure ClassPick;{Does not hide the none class}VAR pX, pY:REAL; obj:HANDLE; classname:STRING; BEGIN GetPt(pX, pY); obj:= PickObject(pX, pY); SetSelect(obj); classname:= GetClass(obj); HideClass(classname); END;RUN (ClassPick);
  11. Heather, Name your worksheet,it's size and distance from the drawing area inthe CONST section and your good to go.Dave -------------------------------------------PROCEDURE WS;CONST WksName = 'My_WS_Name'; {Your worksheet name} Top =1; {Worksheet Top} Left=1; {Worksheet Left} Bottom=2; {Worksheet Bottom} Right=2; {Worksheet Right} WSPositionX=1"; { X Distance from drawing area } WSPositionY=1"; { Y Distance from drawing area }VAR WksH,WSImage : HANDLE; ws1X, ws1Y, ws2X, ws2Y ,d1X, d1Y, d2X, d2Y :REAL; BEGIN WksH := Getobject ( WksName ); ShowWS(WksH,True); SetWSPlacement(WksH,Top,Left,Bottom,Right); RecalculateWS(WksH); ShowWS(WksH,False); WSImage:=GetWSImage(WksH); GetBBox(WSImage,ws1X, ws1Y, ws2X, ws2Y ); GetDrawingSizeRect(d1X, d1Y, d2X, d2Y ); HMove(WSImage,(d2X - ws2X) - WSPositionX, ( d2Y - ws2Y ) + WSPositionY ); END;RUN ( WS ); [ 02-13-2002: Message edited by: Fuge ]
  12. This should do what you want. Keep in mind that this script will work in VW8.5 but would need to be slightly changed for VW9.Dave---------------------------------------------PROCEDURE WSexport;LABEL 99;CONST WksName = 'export'; {The Worksheets name}VAR WksH : HANDLE; BEGIN WksH := Getobject ( WksName );{Checks if the worksheet exists by name} IF WksH = NIL THEN BEGIN Sysbeep; AlrtDialog ( 'The export worksheet does not exist in this document!' ); GOTO 99; END; SelectSS ( WksH ); DoMenuText ( 'WSRecalculate' ); DoMenuTextByName ( 'Export Worksheet' , 0 ); 99 : END;RUN ( WSexport );
  13. Are the window symbols your using allhave the exact same record fields? I might be able to modify the script I have to fityour needs. It may be a few days before I could work on it... Dave
  14. If have posted the first of two plug-ins needed to dump window records into a worksheet andthen put the the information back on my ftp site. Macftp://ftp.nimlokdesigners.com/windowplug-in.sitWindowsftp://ftp.nimlokdesigners.com/windowplug-in.zip Let me know if this does what you intended.Be sure to check out the notes. Dave
  15. Try using "Custom Selection..." or "Custom Visibility" to search for and select or show the objects that meet the criteria of empty "ID number" fields. You can do the same for finding objects that have door ID's but are not door objects. "Custom Selection" and "Custom Visiblity" willwrite the the vectorscript for you based uponthe criteria you choose. You could then modify the find objects with door ID attached script and have it remove that record by adding Delrecord(); command. HTHFuge
  16. If you have 20 windows that are the sameplaced through out your document and you later need to go back and add additionalinformation that is the same for all thosewindows. You can select all the windows at once and enter the additional informationone time across every window . If the windows are all a little differentyou could create a script to dump record infofor each window into a worksheet row. Enterthe additional info for each and have a second script update each placed window. You could also create a script that would cyclethrough each window one at a time and give you a dialog box to set the fields with. HTHDave
  17. I tried the same thing and it worked on objectscreated before the script was first ran. I don't know how your setting the "Position" field, but if you were to type Destination with an accidental space before or after it your vectorscript won't select that object. Just a thought...Good Luck Fuge
  18. You can write a vectorscript to count the number of worksheets in a document (Worksheets are object type 18.)and recalculate all of them. With Vectorscript, you would have to open each worksheet, recalulate it and then close it. Fuge
  19. No way to do it. Sorry Fuge
  20. There is no way to trigger a script simplyby clicking on a tool icon. Your only choice is to put the scripton a script palette or create a customsheets command. Fuge
  21. I'm pretty sure that dimensions are hard coded so that the dimension class is constant. The only way around that would be write yourown dimensioning tool from scratch as a PIO.It wouldn't be too difficult to do. HTHDave
  22. HI, You can call a PIO from within another scriptusing the CreateCustomObject (); The goofy thing is if the object your callinghas never been used in your documentthen your going to get the pref dialogfor the called object the first time you use it. Dave
  23. Here's a snippet from something I use to look up part information. Create a text file namedpartinfo.txt and place it in the Plug-ins folderwith the following in that file.----below here----L90 5 0.5---above here-----It's critical that the text file contains the fields in the exact right format. - IMPORTANTPartName<tab> partprice <tab>partweight<cr>You can add as many parts lines to this file as needed. HTHFuge Procedure lookupinfo;CONST ktype = 'L90'; kFileName = 'Plug-ins\partinfo.txt';VAR Price,wt: REAL; P : REAL; PartFound : BOOLEAN; Procedure LookUpPart; { * Looks up part * } VAR PartName : STRING; PartPrice ,Partweight : REAL; BEGIN Open ( kFileName ); REPEAT; Readln ( PartName , PartPrice , Partweight );IF PartName = ktype THEN BEGIN P:= PartPrice; wt := Partweight; PartFound := TRUE; END; UNTIL ( PartFound = TRUE ) OR ( EOF ( kFileName ) = TRUE ); Close( kFileName );END; BEGIN {* Main * } LookUpPart;AlrtDialog( Concat('Part#',ktype,', Part Price = $',P, ', Weight =',Num2str ( 2, wt ) ) ); END;Run (lookupinfo);
  24. I took a peak at that example.What your missing is the placedsymbol's name must be "Deciduous Tree"or "Conifer Tree" or the field information is not set. You can remove the IF (GetSymName(h) =""from the script and then it will work on any placed symbol. You can also remove the Gettype(H) function and the record will be attached and set to anything selected. HTH Fuge [ 01-12-2002: Message edited by: Fuge ]
  25. Try something like this. You'llhave to add worksheet name constand handle for each worksheet in yourfile or more advanced create a worksheetlist and have the procedure repeat foreach worksheet. HTHDave PROCEDURE WS; CONST WksName = 'worksheet name here';VAR WksH : HANDLE;BEGIN WksH := Getobject ( WksName ); ShowWS(WksH,True); RecalculateWS(WksH);END;RUN ( WS );
×
×
  • Create New...