Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

7 Neutral

About Ion

  • Rank

Personal Information

  • Location
    United States

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I created a script that allows users to set the default linestyle, lineweight, & color to our office standard dash, or change existing selected items to other office standards. I also decided to use the script to make sure that the document has the standard line styles. I will include the script below, it works in that it creates the linestyles, but the index the creation returns is not the actual index of the line. i.e. GetDashStyleIndex() would return -1 for the first execution, but if I then ran a check using name2Index() it would return 7. Therefore the naming function would not work. My workaround was to have the standard line types in a default content folder in the User folder, the creation would associate the name to the line definition. Not sure if I am missing something obvious. Thanks, Ion Procedure dashTool; CONST kLW = 1; VAR result :BOOLEAN; intResult,switch :INTEGER; dashIndex :LONGINT; Function SetLine(objH : HANDLE):BOOLEAN; BEGIN {Set selected object's fore and back pen colors and lineweight} SetLW(objH, kLW); SetPenFore(objH,34952,34952,34952); {grey} SetPenBack(objH, 65535,65535,65535); {white} {Using intResult, call the dialog for the first iteration of ForEachObjectOnLayer()} IF (intResult = 0) THEN BEGIN switch := AlertQuestion('Select Dash Type to Continue', '', 1, 'Standard', 'Centerline', 'Property Line', 'Tight Dash'); intResult := 1; {setting intResult to non-zero values prevents multiple calls of the dialog} END; {based on which button is pressed, set all selected objects to a given linestyle (except property which modifies Line color and weight} CASE switch OF 0: SetLSN(objH,-Name2Index('pults centerline')); 1: SetLSN(objH,-Name2Index('pults standard dash')); 2: BEGIN SetPenFore(objH,6168,8738,52685); {blue} SetPenBack(objH, 65535,65535,65535); {white} SetLW(objH, 12); SetLSN(objH,-Name2Index('pults property line')); END; 3: SetLSN(objH,-Name2Index('pults tight dash')); OTHERWISE Message('Unknown Error'); END; {Ensure that the object shows the result of the linestyle change without user interaction} ResetObject(objH); END; BEGIN intResult := 0; {inititilazation to trigger dialog} {Create the 5 office dash styles. Create Line style then assign name using the index returned by GetDashStyle()} dashIndex := GetDashStyleIndex(FALSE, 1, 1/8", 1/32"); {pults standard dash} result := SetDashStyleName(dashIndex, 'pults standard dash'); dashIndex := GetDashStyleIndex(FALSE, 1, 1/16", 1/32"); result := SetDashStyleName(dashIndex, 'pults drip line'); dashIndex := GetDashStyleIndex(FALSE, 1, 1/32", 1/32"); result := SetDashStyleName(dashIndex, 'pults tight dash'); dashIndex := GetDashStyleIndex(FALSE, 2, 1/8", 1/32", 1/64", 1/32"); result := SetDashStyleName(dashIndex, 'pults centerline'); dashIndex := GetDashStyleIndex(FALSE, 3, 1", 1/32", 1/16", 1/32", 1/16", 1/32"); result := SetDashStyleName(dashIndex, 'pults property line'); {Set default lineweight to 1 mil, or 0.03mm} PenSize(kLW); {Set default line style to 'pults standard dash'} PenPat(-Name2Index('pults standard dash')); {Set default fore and back pen colors} PenFore(34952,34952,34952); {grey} PenBack(65535,65535,65535); {white} {Set default fore and back fill colors and fill style} FillFore(0,0,0); FillBack(65535,65535,65535); {white} FillPat(0); {Set default markers to be off} result := SetDefaultBeginningMarker(0, 15, 0.125, 0, 0, 2, FALSE); result := SetDefaultEndMarker(0, 15, 0.125, 0, 0, 2, FALSE); {if items are selected on editable layers, send handle to SetLine()} ForEachObjectInLayer(SetLine, 2, 0, 4); END; Run (dashTool);
  2. Ion

    Vectorworks Design Summit - 2018

    Thank you so much! I was crushed when I wasn't able to make it last year (if I am honest, it had way more to do with work schedule than distance). Given that it is in Phoenix however, makes it a single flight, and friends in the area that can help with recommendations. Sign me up Coach, i am all in! Cheers & I can't wait to see any and all that will attend. Ion