Jump to content

Pat Stanford

Moderator
  • Content Count

    5,176
  • Joined

  • Last visited

Community Reputation

482 Spectacular

About Pat Stanford

  • Rank
    Vectorworks Veteran

Personal Information

  • Homepage
    vectortasks.com
  • Location
    El Segundo, CA, USA

Recent Profile Visitors

4,005 profile views
  1. Pat Stanford

    Saved View Navigation

    Use the PlugIn Editor under the Tools:Plugins menu. Create a new Command. Edit the Script. For the script enter: VRestore('Name of Saved View to Restore'); obviously change the string to be the name of your saved view. Then add that command to your workspace and add a keyboard shortcut using the Workspace editor. Take a look at this thread for more information, and ask again if you need more help.
  2. Pat Stanford

    Fixed Data Fields in Record Formats

    Another possibility would be to have multiple records and make the one with fixed data invisible. Those in the know would either be able to show the record to edit the data or use a worksheet to make the edits. This would still allow the possibility of a user accidentally modifying data in a worksheet. Or attache the fixed data to a locus point that is inside the symbol. Then you would have to be in Symbol Edit mode to be able to change the record in the OIP. Just a couple more ideas.
  3. Pat Stanford

    Japanese Font Issue VW 2019 Mac Version

    This is an Adobe issue and copyright issue more than a VW issue. The PDF standard (by Adobe) says that if a font can not be guaranteed to be not copyrighted then the font can't be embedded into the PDF. That means that anyone who does not already have a copy of the font will see a font substitution. Likely a box. Can you use a different genuine Adobe font so the font can be embedded in the PDF?
  4. Pat Stanford

    Saved View Navigation

    Saved views are Vectorscripts (hidden deeply under the skin). You can open the Saved View Palette and call up any saved view from there. You could relatively easily make a Plugin Command, add it to your workspace and add a keyboard shortcut to allow easier access if you really need that.
  5. Pat Stanford

    Design/Cost - Live

    Not true. If a generic costing algorithm works for you that is great. But it does not end the debate about its applicability to other users. For me it does not work.
  6. Pat Stanford

    Fixed Data Fields in Record Formats

    The record instance attached to each object in the drawing is unique. That means that you can change any field of any record without effecting other objects in the drawing. You can select multiple object and and change the data of all of them at once, but this will not prevent you from adjusting a different value to a single instance afterwards. If you have not already done so, I recommend you edit your workspace and add the Custom Selection tool. This will allow you to select every instance of objects with a specific record attached. You can then go to the data pane of the Object Info Palette (OIP) and change and field to the value you desire.
  7. Pat Stanford

    Adding text to a dimension

    In the Object Info Palette (OIP) you have fields for Leader, Trailer, and Notes. There is also a pull down menu for Tolerance. You can use these fields to add the text you are looking at adding. Leader is in line with the primary dim in front of the dim. Trailer is in line with the primary dim behind the dim. Notes is on a separate line below the primary Dim.
  8. Pat Stanford

    Is there something like dynamic blocks in Vectorworks

    Yes, only Symbols offer Linked Text To Record functionality. Any object can have any number of records attached that can be accessed through the Data pane of the OIP and/or a Worksheet. PIOs have a custom Parameter Record that holds all of the data shown on the Shape pane of the OIP (and often additional internal information). This parameter records can not be attached to other types of objects.
  9. Pat Stanford

    Learning Vector Work.

    I don't have time to do a full in depth class on how VW works, but you are correct the simple version does not work inside viewport annotations. If you need it to work anywhere, you will need to do more checking on the object to figure out where it is. The basic way to do this is to GetTypeN(GetParent(Handle_to_Object)); If the type of the parent is a layer then you handle it one way. If the parent is a group or symbol you handle it another way. You have to do more explicit checking to see if it is the annotation group of a viewport. The best suggestion I can offer right now is to search in the Vectorscript and Archive-Resource Share-Vectorscript forums for Viewport Annotations. I know I have posted on this before. Sorry I don't have time to help more right now or next week. I will try to answer specific questions if I can.
  10. Pat Stanford

    Learning Vector Work.

    You only need to use 22 if you want a box around the "secondary" dimension. VW lets you do dual dimensioning (say metric & imperial at the same time). 5 will box the Primary dimension, 22 will box the secondary dimension. You have to run two commands to box both. You can try RedrawAll in place of the ResetObject. If you are only doing a single dimension with the script then ResetObject is probably better. If you are looping through a lot of objects RedrawAll is probably better as it will only have to update the screen once instead of after every dimension. In that case you would use it near the end of your script after you have changed all of the dimensions. The SetDimText command will convert any line into a dimension. You can certainly create an auto dimension tool, but my guess is that by the time you get it worked out and all of the special cases and error checking needed to make it work no matter what kind of an object you throw at it, you will spend more time than you would spend dimensioning manually over the next decade. Check the function reference for routines returning the vertices of polygons and remember that rectangles are not polygons and have to be handled as a special case. What would you do when someone passes a curve or a circle instead of a box? What about when text, or a symbol, or some other kind of object. All cases that a general purpose script will have to handle, even if only by explicitly not handling them. Good luck if you choose to proceed.
  11. Pat Stanford

    Learning Vector Work.

    I don't know of a way to set the Box Text option as the default. The two lines below will set the Box Text option for the first selected object on the active layer. You could wrap this in a repeat loop of use ForEachObject to handle every dimension in the drawing. If you need to box the secondary dimension instead of the primary, switch the 5 to 22 in the SetObjectVariableBoolean line. SetObjectVariableBoolean(FSActLayer,5,True); ResetObject(FSActLayer); The Reset is required to get the box to actual show. If you are doing a bunch of objects in the script you can probably do a RedrawAll instead and it will only have to update the screen once and might make the script faster for many dimensions. Ask again if you need more help.
  12. Pat Stanford

    Learning Vector Work.

    I think you may need to give us a better description of what you want to do. The simplest way to do what I am reading in your question is to put the text into the Note field. The Vectorscript command to do that is SetDimNote(Handle_to_Dim, 'Note Text); If you really want a more complicated text box to be associated with a dimension then you probably need to create a custom object (PlugIn Object) that consists of the dimension and a separate text box.
  13. Pat Stanford

    Create New Document

    The script equivalent to clicking in the middle would be MoveTo(0,0); Another option would be to Group the objects, get a handle to the group, get the center of the group, HMove the group by the negative of the center (i.e. back to 0,0), Change the layer, and ungroup. The ones that are not centered probably have some object way out in space that you need to investigate and either move in closer or delete.
  14. Pat Stanford

    Create New Document

    If you are on a Mac you should be able to use an Applescript to open a new file from the template and then run the script to do the dwg import. Vectorscript/Pythonscript are very document centric, so there is really no way to have them open a different VWX file. It seems like you should be able to script importing of layers and classes like you can from the Organization Palette, but I can't find the right calls in the Function Reference. @JBenghiat Do you have a way to script importing layers and classes? Do you have a single template file or different templates for different uses? If you have only one, then if you name it default.sta (and store it in the right place), it will automatically open when you open VW. Or what about storing the import script as part of a template file. Then to get the script they have to open a new document from the Import Template and then run the script. Ask again if you need more information.
  15. Pat Stanford

    How to retrieve detail level in PIO

    I think you have to set the three object variables for each item that you wish to be controlled by the detail level. So for an object that will show in Low, Medium, and High Detail, you would need to set all three (750,751,752) all to true. For an object to display only at Low, you would set 752 to True and 750, 751 to False. For an object to display only at High you would set 750 to True and 751, 572 to False. Try this on a simple object and see if it does what you expect.

 

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.

×