Jump to content

Pat Stanford

Moderator
  • Posts

    12,728
  • Joined

  • Last visited

Posts posted by Pat Stanford

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

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

     

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

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

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

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

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

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

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

  14. ForEachObject handles the Handles for you. 😉

     

    Notice the definition of Callback(H1:Handle);  

     

    What this means is that  the procedure has to be passed the handle to an object to be able to run.  So if your were going to "manually" call the procedure you would have to do something like Callback(HandletoMyObject); or else you would get an error.

     

    Internally that is exactly what ForEachObject does. It makes a list of the handles of all the objects that match the criteria and then it calls Callback one time for each object passing the handle to the object as a parameter. So at the top of Callback H1 will contain the handle to the object passed by ForEachObject. The fact that you redefine what that handle points to does not matter to the code. It just knows that it called Callback with the handles it was supposed to use.

     

    Clear?

  15. Hi @EBV_Nick The SetDSelect is ingenious, but not the solution I had in mind.

     

    I would have just removed the FSActLayer.

     

    ForEachObject passes the handle to the object to process to Callback, so H1 already has the object to process so you don't need to assign the variable.

     

    What you have now works great with the criteria we are using, but would fail if you changed the criteria to be objects that are not Visible and Selected. [VSEL] or even if they are visible and selected but not on the active layer.

     

    Glad I was able to help. Ask again if things are not clear.

  16. The order you are stating sounds strange, but that definitely sounds like a Text sorting versus Numeric sorting problem.

     

    The field you are using is probably stored as Text. That way if you need sheet 3A you can have it rather than just numbers. 

     

    But when you have a Text field it sorts using alphabetic (ASCII) sorting rather than numeric.

     

    So it sorts by the first character, then by the second character, then the third, etc. So you get something like:

     

    1, 10, 11, 2, 3, 4, 47, 48, 5 ....

     

    The traditional work around for this is to use leading zeros so that all of the numbers are the same number of characters.

     

    01, 02, 03, 04, 05, 10, 11, 47, 48.  

     

    If you need more than 99 sheet you need to pad to 3 characters,  001, 002, 010, 011,  etc.

     

    But send Nikolay a movie anyway so he can make sure there is not another bug hiding here.

    • Like 1
×
×
  • Create New...