Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Fuge

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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 );
  6. 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);
  7. 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 ]
  8. 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 );
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. No way to do it. Sorry Fuge
  16. 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
  17. 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
  18. 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
  19. 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);
  20. 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 ]
  21. 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 );
  22. see "Using VectorScript Include Files" http://www.nemetschek.net/support/custom/vscript/docs.html
  23. Fuge

    z value

    If you are trying to get the height of a 3d symbol try using Get3DInfo(); If you are trying to get how far a symbol is offset from zero then you need to use Get3DInfo(); and Get3DCntr(); and do a subtraction to find the bottom of the 3d symbol. HTH
  24. Juan, You now need to use "Menu Chucks" { To Group } Domenutextbyname('Group Chunk',1); { To Ungroup } Domenutextbyname('Group Chunk',2); See Appendix H - DoMenuTextByName Constants http://www.nemetschek.net/support/vscript/vs_function_ref/VSFunctionReference.html HTH [This message has been edited by Fuge (edited 08-14-2001).]
  25. Sam, I gave this a try and it worked for me? It assumes the Fixture Data record format already exists. ------------------------------ Procedure Test; Var TypeString,WattageString:STRING; SymbolHandle:HANDLE; begin TypeString := StrDialog('Fixture Default Type',''); WattageString := StrDialog('Fixture Default Wattage',''); DoMenuTextByName('Create Symbol',0); SymbolHandle := ActSymDef; SetRecord(SymbolHandle, 'Fixture Data'); SetRField(SymbolHandle, 'Fixture Data','Type',TypeString); SetRField(SymbolHandle, 'Fixture Data','Wattage',WattageString); end; run(Test);
  • Create New...