Jump to content

Pat Stanford

Moderator
  • Posts

    12,705
  • Joined

  • Last visited

Posts posted by Pat Stanford

  1. I have not looked at it in a long time, but it used to be that the Issue and revision data were stored in a record.filed combination, but in an almost unusable format in a worksheet.

     

    Each issue of revision had multiple fields that were named differently for each separate issue (something like date1, date2, date3, name1, name2, name 3...) While you could put these into a worksheet, they would not line up with all of the dates in one column, names in another, etc. If you did the work get them to line up, you still would not be able to edit them from the worksheet.

     

    I gave up on trying to use a worksheet for editing revisions.

  2. Total guess here, but based on the Left alignment of the numbers in column E and the count in the header row of E2=3, it looks like they are formatted at text instead of as numbers. Try changing them to be formatted as numbers (Worksheet Format menu:Cells, Decimal with 0 decimal points).  

     

    The Header Row (E2) should give you the sum of the numbers in the column.  If you want to be able to hide the header row, you can still access that data. Just set E4 to =E2.

    • Like 1
  3. For the benefit of others, what solution did OzCad suggest?

     

    My suggestion is that since all of the records have the same fields, to use a single record format, possibly modified from your current format to include a field to specify the light type.

     

    If you only have a few different record formats, you could use IF statements to get what you want (both in the criteria and in each field), but the single record format will be a much easier way to pull the data from the different light types into a single schedule.

    • Like 1
  4. You should be able to do this in Vectorscript. I don't know enough about Marionette to know if you can do it there or not.

     

    Check out the VSOWidgetPopupAdd command. With that  you should be able to get the data from the first popup and use that to filter the items that you pass to the second popup.

     

    I have some other information I will send you off line.

    • Like 1
  5. I don't have a list of error codes, but after a few minutes of playing I think it is the -1 path that is the problem.

     

    It appears based on comments on the developer wiki reference list that you can't access the 1 and 12 (Applications folder and User App Data) folders. When I try I get the -1028 error.

     

    Try -15 for now. This is the Settings folder in the User Library:Application Support:Vectorworks:2019:Settings.

     

    It appears to create the file with no problem there.

  6. Unfortunately, there is no super easy way to do this in VW.

     

    You can use the Deform Tool in the Bend mode to make the band match the Extrude, but the bolts won't move with it when you bend it.

     

    Zoom close in on bend shape and draw a line across the bent bar using the edged of the holes as a guide to get the angle of the hole. Use that angle to Rotate each fastener/assembly to the correct angle and then move into place. The Move By Points tool is a good way to do the move. you just need to make sure you zoom in or use the Snap Loupe to get the correct points.

     

    A move and rotate to perpendicular tool would be a nice wish to request.

     

  7. Welcome to Vectorworks!

     

    Everything is working exactly the way it is supposed to! Now we just need to help you wrap your head around what that way is.

     

    Symbols Instances in drawings are effectively a link to the Symbol Definition. If you change the Symbol Definition, every Instance changes to match, but keeps it's original position and rotation. So, if you have a chair symbol and there are 8 of them around the table, and you decide you don't like something about the definition (color, line weight, round vs square, etc.) when you change the Symbol Definition of that chair, every instance in the drawing of that symbol changes. Extremely useful. And sometimes extremely annoying when that is not what you really wanted.

     

    So in your case to generate symbols with different numbers of chairs, you need a way to break the link between the Symbol Definition and the specific Symbol Instance that you want to change. Under the Modify Menu:Convert is a command named Convert to Group. This will take the current selected symbol and make a group out of it in whatever view you are currently in. (If you only have a single object selected, it will not make the group but rather just convert it to a single object). You can then edit the group (and probably Ungroup it) and then make a new symbol from the objects.

     

    If you have a Hybrid Symbol (contains both screen plane and 3D objects), the Convert to Group will only get you the 2D (Screen Plane, Top/Plan) view or the 3D objects, but not both. You can either duplicate the symbol and Ungroup it in Top/Plan and some other view, or you can find the symbol in the Resource Browser, select it, right click and choose Duplicate. This will give you a duplicate of the original symbol. Select it, right click and rename to something that makes sense. Right click again and Edit the new symbol. You can edit both the 2D and 3D aspects of the Symbol Definition separately from the Resource Browser.

     

    Once you have a new Symbol Definition, select the original symbol and choose Replace in the Object Info Palette (OIP). This will let you select the Symbol Definition to use for that Symbol Instance. The insertion point and rotation of the replacement Symbol Definition will be the same as the original Symbol Instance.

     

    If you really want to get fancy, you could use Marionette or Vectorscript (Pythonscript) to generate a PlugIn Object that would let you enter the number of chairs in the OIP, but that is definitely a discussion for another thread and probably many hours of work.

     

    If this is not clear enough, please ask again.

  8. My understanding is that different criteria (Layer or class or record.field, etc.) are all ANDed together.

     

    Multiple instances of the same criteria (all the Layers for instance) are ORed together.

     

    There is not way to specify any different setup other than to manually edit the criteria in the formula bar.

     

    Yes, there should be a better criteria editing system in general.

  9. 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.

  10. 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.

  11. 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?

     

    • Like 1
  12. 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!

    • Like 1
  13. 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.

    • Like 1
  14. 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.

  15. 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.

     

    Quote

    Python:

    def  vs.SetMeshVertex(hMesh, index, pt):

       return None

     

    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.

    • Like 1
×
×
  • Create New...