Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

9 Neutral

1 Follower

About PatW

  • Rank

Personal Information

  • Location

Recent Profile Visitors

418 profile views
  1. PatW

    Focus and Zoom on each selected

    ForEachObjectInList needs a callback function you can do the selection inside there instead off looping a list. Theres a good example on: http://developer.vectorworks.net/index.php/VS:ForEachObjectInList regards, Patrick
  2. PatW

    different calculations

    Hi CETLV, are definitely only the objects that we see on the picture in the drawing? When calculating "All" Braceworks consideres also objects that are hidden. I would take a look into the file if you can share it.
  3. PatW

    Create New Document

    The windows equivalent to AppleScript would be ActiveX here: Unfortunately it's not documented and very unstable. If you are lucky it will work.
  4. PatW

    Marionette in Spotlight

    You need to provide the internal plug-in name, usualy this is the name that you see in the OIP. To get the definite name use this little script (Python): # Example obj must be selected hRec = vs.GetParametricRecord(vs.FSActLayer()) print (vs.GetName(hRec ))
  5. PatW

    Marionette in Spotlight

    Hi Patrick, with these commands you should be able to do the job. They should be also available as Marionette nodes. Otherwise you can create them. http://developer.vectorworks.net/index.php/VS:Function_Reference CreateCustomObject(objectName, p, rotationAngle) SetCustomObjectPath(); The params can be modified with: GetParametricRecord SetRField
  6. PatW

    Save File with Script

    Hi MTRobin, you could invoke the menu comand "Save copy as..." by http://developer.vectorworks.net/index.php/VS:DoMenuTextByName
  7. Hi, as I know there is no way to get Events with VectorScript so it will not be possible to trigger your PIO when a symbol changes. In the SDK you would create a class that inherits from VCOMImmediateImpl<IObjUpdateSupport> to catch global events. class UpdateSupportProvider : public VCOMImmediateImpl<IObjUpdateSupport> { public: UpdateSupportProvider(CallBackPtr); virtual ~UpdateSupportProvider(); // IObjUpdateSupport public: virtual void VCOM_CALLTYPE Init(IObjUpdateSupportContext* pContext); virtual void VCOM_CALLTYPE OnNotification(IObjUpdateSupportContext* pContext); virtual void VCOM_CALLTYPE OnState(IObjUpdateSupportContext* pContext, const ObjectState& state); ...
  8. Hello, maybe you simply forgaot the "namespace" try this: import random print ( random.randrange (0, 500, 3) )
  9. PatW

    Script to save multiple file versions

    You could look if there es a selector to call the menu command: See:
  10. PatW

    Rename objects

    def vs.Poly(p): return None Poly is not returning tha handle 😉 Look for the function LastCreatedObj or similiar to get the handle. Edit: To slow. But one addition if you want to make sure that LNewObj is giving you the right obj you can first execute LNewObj save the handle then create the poly, do LNewObj again and check if the result is not the same as from the first call.
  11. As a test I created a WorldBased and a PageBased Symbol next to each other. When the Design-Layerscale is changed the size relations of the two symbols change as expected. (At some scale Smybol A is bigger at another Symbol B is bigger.) But when this syms are both in the viewport and I changed the Viewport layerscale the whole scene simply gets bigger or smaller and the relations stays the same. So in this case the PageBasedSym is not behaving different. Maybe you meant something else.
  12. But absolute Symbols seem also not to care about ViewPorts. So maybe it will behave the same with the ObjectFlag. Have you tried: vs.SetObjectVariableBoolean(h, index, status)
  13. PatW

    Export text to txt using python

    Hi avictorgm, I would recommend the python functions for file stuff: with open ("file.txt", 'w') as file: file.writeline ("xxx");
  14. If you want to Draw the object in absolut scale (always the same size on the print) you simply need to consider the layer scale: mmVW = absoluteMM * layerScale; To convert the Millimeters in the drawing unit you can use: VS:GetUnits fractionLONGINTApproximate WorldCoords per drawing unit. Use GetPrefReal(150) instead.
  15. PatW

    Dialog control to select textures

    Hi, first build a resource list with "BuildResourceList" then fill the values into an ImagePopUpResource: http://developer.vectorworks.net/index.php/VS:InsertImagePopupResource


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.