Jump to content

Fuge

Member
  • Posts

    157
  • Joined

  • Last visited

Posts posted by Fuge

  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. Yes tongue.gif" border="0 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 );

  7. Heather, Name your worksheet,it's size and distance from the drawing area inthe CONST section and your good to go.Dave grin.gif" border="0 -------------------------------------------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. 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

  10. 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

  11. 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

  12. 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

  13. 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);

  14. 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 ]

  15. 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...