Jump to content

Pat Stanford

Moderator
  • Content Count

    5,264
  • Joined

  • Last visited

Community Reputation

513 Spectacular

About Pat Stanford

  • Rank
    Vectorworks Veteran

Personal Information

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

Recent Profile Visitors

4,087 profile views
  1. Pat Stanford

    Export to Sketchup - weird lines

    If you were bringing something into Vectorworks and it did this I would say that Cubic Spline Smoothing was turned on. I don't know enough about Sketchup to know it there are smoothing options or not.
  2. Pat Stanford

    set shadow by class

    SetDropShadowByCls( h:HANDLE; byClassValue:BOOLEAN) ; Sets the check box for Use Class Drop Shadow in VW2019, but there seems to be a bug as the shadow does not actually display until you hit the Edit Shadow button in the OIP. I have tried the usual tricks of ResetObject and RedrawAll, but none of them cause the shadow to draw until you click the Edit Shadow button. It does not even matter if you click OK, as long as the dialog opens, the shadow draws when it closes.
  3. Pat Stanford

    Worksheets and material pricing

    Thanks @Peter Vandewalle I thought I was going to have to search the archives for this 😉
  4. Pat Stanford

    Worksheets and material pricing

    If you have a small number of options you could use nested IF statements to look up the price per unit in either the same worksheet or a different worksheet. =IF(Object.Material='Plexi',$B$3,IF(Object.Material='Cloth',$B$4,IF(Object.Material='Wood',$B$5,'Unknown Material') Where Object.Material is the record.field that holds the material data. If you already have it in a worksheet/database cell you could just reference the cell also. If you have too any options for a set of nested IFs (more than 3 or 4), then a Worksheet Script could be created that would read data, probably easiest form a separate worksheet of prices. You would pass the script the name of the worksheet, the column with the reference value and the column with the data to return. That way you would only have to keep the data up to date in one place. The down side being that the data would not be stored with the object and you could not easily overwrite the value for a single object. Ask again if you need more help.
  5. Pat Stanford

    vs. AddSurface in this situation??

    Like I said, someone else will have to help with Python syntax 😉
  6. You are correct that it does not seem to work when using Multi-view. Can you click on the Bug Submit link at the bottom of the page and report it?
  7. Pat Stanford

    Finding objects within a perimeter

    LOC only works for 2D objects (polys, rects, ovals, etc.) and spaces as far as I know. It does not work for Groups or 3D objects (other than spaces) or other PIOs (there are probably some exceptions, but I don't know them.) But it does work even when the objects are INSIDE of groups. So you can't set the Group to be TMP, but you can enter the group, name the big poly and then exit the group and LOC will still work. Does that help?
  8. Pat Stanford

    vs. AddSurface in this situation??

    Nice work. I thought I had responded last week, but it ended up sitting as a draft. You ended up exactly what I was going to recommend. Add 2 then add Repeat add 1 to the result. You might need to add some error checking. The manual for AddSurface says it only works with overlapping objects. You could get a nil handle for the added object if they don't overlap. Good Job!
  9. Pat Stanford

    Use marionette to create parameters on object

    Ask as you have more questions. I can help with the VS calls to use. The Python syntax will have to be someone else. Regards, Pat
  10. Pat Stanford

    Call "Export to Vectorworks 201x" from VS?

    In the English (American) version DoMenuTextByName('Export Previous File Version',1); DoMenuTextByName('Export Previous File Version',1); Exports a 2018 file from a 2019 document. Increment the 1 for older versions. I don't know if you need to use localized strings for the chunk name or not.
  11. Pat Stanford

    Finding objects within a perimeter

    Give them both separate names and use LOC Is Within Big Poly & LOC is Not Within Little Poly? But I don't think that will get you an object the partially overlaps the small poly. You will probably have to manually compare the bounding boxes of the small poly to each object inside the large poly to check for overlap.
  12. Pat Stanford

    Use marionette to create parameters on object

    Yes, Anything you can do in VS you can also do in Pythonscript. In Pythonscript you can actually do more. I just personally dislike the white space as delimiter notion of Python. Makes it very hard for me to debug. Yes you can get and set vetches of mesh objects with Python. You need a handle to the mesh, an index to the vertex you want to move, and just pad the X/Y/X positions you want it to take.
  13. Pat Stanford

    Use marionette to create parameters on object

    Yes, you can use Marionette for this, but this is the type of thing that I think Vectorscript (VS) is better at than Marionette. Many of the things you have listed above are a single line of code in VS once you get a couple of 10-20 line "wrappers" that you can basically reuse. In Marionette since everything is a node, you end up having to add a lot of extra nodes to do some of these things. It will also depend on more explicitly what you are trying to do. If you want to operate on a single selected object that will be much easier than if you want to operate on multiple objects in the drawing. The Marionette Gurus and I have a friendly ongoing debate about Marionette vs VS. What type of object are you talking about with a Face Size? Give us a little better description of what you want to do and we can offer better recommendations.
  14. Pat Stanford

    Replacing extruded shape with 3D symbol

    Not easily. It appears that the Racks in the Objects-Ent Stage:Rack Cases.vewx are all individual symbols rather than being a plugin object (PIO). That means that you will not be able to easily modify the size. If I am missing a PIO that generates a case, then you could theoretically write a script that would get the dimensions and center point of your extrude, delete it, and them place a PIO at that location and set the parameters for the size. You could theoretically do this with the symbols, but you would have to go through the list and pick the ones that are closest to your dimensions which many not be close enough for your needs. If you have not scripted before there is a pretty steep learning curve. As in 5 to 10 hours or more. It will depend entirely on your programming experience and how many bells and whistles you need. Make sure you really define the problem with all of the exceptions before you start trying to write it. Hopefully someone else has a better answer. If you decide to go with a script I will be glad to try and help. Just ask again.

 

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.

×