Jump to content

Pat Stanford

Moderator
  • Content Count

    5,174
  • 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

3,992 profile views
  1. 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?
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. @MullinRJ @JBenghiat @Julian Carr Can anyone provide a way to get a handle to a symbol instance on a drawing given only a handle to an object in the symbol definition? I have a symbol of a bathroom. Inside that symbol is a symbol of a toilet with a record attached. I create a worksheet and use a worksheet to pull data from the toilet symbol into separate subrows of a database. This works fine. Now I want to know where the toilet symbol I am pulling data from is located on the drawing. I can't figure a way to get that information. The worksheet location functions, Symloc or XCenter/YCenter in a worksheet script all return the location of the symbol in the internal coordinates of the bathroom (parent) symbol. The Handle to the toilet symbol is the same for multiple instances of the symbol. I need a way to get the location of the toilet, or even better a handle to the parent symbol instance. It seems impossible, but maybe the deep thinkers here can see something I can't. Regards, Pat
  15. Pat Stanford

    How to retrieve detail level in PIO

    It appears to be ObjectVariableBoolean Visible at XXX level of detail 750=High 751=Medium 752=Low So SetObjectVariableBoolean(Handle, 750, True) would make an object visible at high level of detail. If you also set 751 and 752 then it would be visible at all three levels of detail. GetObjecVariableBoolean(Handle,750) should return the if the object referenced by Handle displays at High detail level.

 

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.

×