Jump to content

Pat Stanford

  • Content Count

  • Joined

  • Last visited

Community Reputation

526 Spectacular

About Pat Stanford

  • Rank
    Vectorworks Veteran

Personal Information

  • Homepage
  • Location
    El Segundo, CA, USA

Recent Profile Visitors

4,147 profile views
  1. Pat Stanford

    Automatic Class Assignment for a bunch of objects

    Yes, everything you want to do can be readily easily done in either VectorScript of PythonScript. If you remember any of your Pascal and don't mind the Begins/Ends it requires, then Vectorscript is probably your best bet. If Begins/Ends drove you crazy, then you might want to consider Pythonscript instead, but then you get to deal with it being "white space" delimited and an extra space will put something at a different indent (and therefore subroutine group) level. Here is some pseudocode. Procedure Create-Set-Class; Procedure Make_It_So(H1:Handle); {procedure to be called by ForEachObject} Var S1:String; Begin S1:=GetRField(H1,'Your-Record-Name'.'Your-Class-Name'); NameClass(S1); {Note Class names can only be 20 characters long} SetClass(H1,S1); End; Begin ForEachObject(Make_It_So,((R IN ['Your-Record-Name']))); End; Run(Create-Set-Class); The above was typed into the forum, so please excuse any typos or other errors. You may want to change the criteria in the ForEachObject to limit it to just objects that are on a specific layer or have specific field values. You will definitely need to change the record and field names to match what you are using. Good luck and let us know if you need more help.
  2. Pat Stanford

    Sheet size increases when exporting from VW to PDF

    I can force this to happen if I go to Page Setup the click the Printer Setup... button. From the second Page Setup dialog box, on the Page Attributes settings I have a Scale at the bottom of the page. If I set that to 50%, then the drawing only fills the top/left 1/4 of the page. There is also a second Scale setting. From the same dialog box choose Vectorworks from the dropdown at the top choose Vectorworks. If I set that to 50%, then I get a small version of the drawing in the center of the PDF page. Let us know if this helps.
  3. Pat Stanford

    Count truss objects

    Unintentional, but still funny now that I think about it. Hope you are well.
  4. Pat Stanford

    Count truss objects

    You are welcome. I figured the short version answer would be enough for you. ūüėČ
  5. Pat Stanford

    Count truss objects

  6. Pat Stanford

    Move dimension text left or right

    Kind of, but I have run out of time to play tonight. SetObjectVariableBoolean(FSActLayer,29, False); SetObjectVariableReal(FSActLayer,44,1'); ResetObject(FSActLayer); RedrawAll; 29 turn off the Auto Position Text. 44 sets the dim text offset Reset and Redraw are just there to make sure the update shows properly and are probably not needed. But what I am seeing is that negative numbers offset to the left of the witness lines and positive numbers offset to the right of the witness lines (in a horizontal dimension). I have not figured out how to shift it and stay within the witness lines.
  7. Pat Stanford

    Sheet layer orientation and Title block arrangements

    Changes to the scale sounds like it is an option in your printer driver to fit to the page. You probably need to set the paper size to match the actual printable area of your plotter. If your plotter needs 10mm margins all the way around (an exaggeration), then rather than 594 √ó 841 (A1) paper you would specify a drawing size of 574 x 821. Then you should be able to get an unscaled version. As to why they have not added it directly to VW is probably because there are so many 3rd party options for printers/plotter, drivers, and operating systems that all do things somewhat differently that there is not way to come up with a solution that will satisfy most (not even close to all) people. Once you get it set once for your needs you should be set to go.
  8. Pat Stanford

    Sheet layer orientation and Title block arrangements

    Can you set a custom paper size in the Printer Setup dialog box for your plotter? Set the custom paper size to be the portrait dimensions and then use One Printer Page in the Size: drop drop menu.
  9. Pat Stanford

    How do I avoid the wall insertion of my plugin?

    In Vectorscript it would be SetObjectVariableBoolean(ObjectHandle, 6709, True). It should be similar in the SDK.
  10. Pat Stanford

    Symbols Not Scaling with Viewport

    Page Based symbols are designed to always display at the same size on a page. So if you have a drawing label of some type, it will display the same size on a page at 1:1 scale as on a page at 1:20 scale. World based symbols adjust based on the scale of the layer they are on to always be the same "drawing world" scale. So if you have a toilet to proper scale it will display properly in both the 1:1 and 1:20 scale and look much larger in the 1:1 layer. It is likely that you clicked the Page-Based radio button when you created the symbol. You can right click on the symbol in the drawing and choose Locate Symbol in Resource Manager. Then go to the Resource Manager, and right click on the symbol definition and choose Edit Symbol Options. From there you can change the symbol from Page to World (or visa versa). You might want to try in a test file first to figure out what scale you want to be in when you make the change to get it to work right for you.
  11. Pat Stanford

    Sheet layer orientation and Title block arrangements

    You can pick a Size with the appropriate dimensions from the Page Setup dialog box. Or if you click the Printer Setup button, you can then choose the paper size and orientation from there. But that works best if you have a printer that supports the final paper size you want to output on. If you send your plots out, it is less useful.
  12. The following worksheet script will return the component index of the first component in a wall that has the Function specified by the passed integer. Put this in a database and it will give you the Load-Bearing component of each wall. Use that returned value in a =ComponentName() function to get the name. You may want to put the Index into a column that can be hidden. This script can be run in any file that it exists in. If you want to get fancy, you can slightly change the way the script is called and store it as a text file accessible from any VW file. Copy and paste everything in the code block below into a new black script file (from the Resource Browser). Make sure the script is named ComponentIndex. Use the function =RunScript('ComponentIndex',1) to get the Load-Bearing component index. If you put this in database cell C3, then set C4 to =ComponentName(C3) to get the name of the component. Ask again if you have more questions. Procedure ComponentIndex; {July 11, 2019} {© 2019 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {This is intended to be run as a worksheet script and to} {return the first component number that has the function} {indicated by the integer values below} {That retuned component number can then be used to lookup} {the ComponentName.} {Run using a WS call of =RunScript(ComponentIndex,1) to return} {the component number of the Load-Bearing component.} {Pass the values below to the WSScript to get the componet with that function 0 - Other 1 - Load-Bearing 2 - Insulation 3 - Inner Finish 4 - Outer Finish 5 - Air Gap } Var WallH:Handle; B1:Boolean; NumComponents,N2:Integer; ComponentFunction:Integer; ThisFunction:Integer; Begin WallH:=WSScript_GetObject; ComponentFunction:=WSScript_GetPrmInt(0); B1:=GetNumberOfComponents(WallH,NumComponents); For N2:= 1 to NumComponents do Begin B1:=GetComponentFunction(WallH,N2,ThisFunction); If (ThisFunction=ComponentFunction) then WSScript_SetResInt(N2); End; End; Run(ComponentIndex);
  13. Pat Stanford

    Fire Door ID Tag

    I don't know if you know about editing data tags or not, so I am going to go step by step. 1. Start with a Tag Style that you like. 2. Select the Tag and convert to Unstyled. 3. Click the Edit Tag Layout... button at the bottom of the OIP (will only be active with an unsettled tag). 4. If you want an additional piece of text add it as a placeholder and leave selected. If you want to reuse the existing piece of text select it. 5. You should have it say Text in Tag Layout in the OIP. 6. Make sure the Use Dynamic Text check box is selected in the OIP and click the Define Text Field... button. 7. In the Define Tag Field dialog box, make sure the Calculated Field radio button is selected. 8. If there is already anything in the Current Tag Field Definition, delete it. 9. Set the Data Source to Object Parameters. 10. Set the Object Name to Door - #Door# 11. Set the Parameter Name to Door Fire Rating - #DoorFR# 12. Click the Add to Definition button. 13. Click the OK button 14. Click the Exit Tag Layout Edit button at the top right. 15. If it does not look the way you want, go back and edit again. 16. Once it looks like you want, choose the Style Pulldown from the OIP and choose New Plug-in Style from Unstyled Plug-in. 17. The style is now only in this file. Use the Resource Browser to put it into a Favorite or even better into the Default Content (directions elsewhere on the forum) Ask again if you need additional help.
  14. Pat Stanford

    "Mirror" script returns point error

    It appears that Vectors are 3D as are Point3D. I think those are interchangeable. Point only has X and Y and is what is required in this case. Check out the Vectorscript Language Guide for more information.
  15. Pat Stanford

    "Mirror" script returns point error

    Points and 2D Vectors are the same. 3D Points and 3D Vectors are the same. My understanding is the have been given both names so as to not confuse people who are using them for different purposes. Someone who is trying to specify a point in space would think about using points. Someone who is trying to descriptor the motion of an object through space would use a vector. They both are just a combination of real values along the X/Y/Z axis.


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.