Jump to content

Search the Community

Showing results for tags 'vectorscript'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Announcements
    • Announcements
    • News You Need
    • Job Board
  • Feedback
    • Wishlist - Feature and Content Requests
    • Known Issues
    • Wishes Granted / Issues Resolved
  • General
    • Troubleshooting
    • General Discussion
    • Architecture
    • Site Design
    • Entertainment
    • Vision and Previsualization
    • Braceworks
    • ConnectCAD
    • Rendering
    • Workflows
    • Buying and Selling Vectorworks Licenses
    • Hardware
  • Customization
    • Marionette
    • Vectorscript
    • Python Scripting
    • SDK
    • 3rd Party Services, Products and Events
  • Solids Modeling and 3D Printing
    • Subdivision
    • Solids Modeling
    • 3D Printing
  • Vectorworks in Action
  • Archive
    • Resource Sharing
    • Machine Design


  • Knowledgebase
    • Tech Bulletins
    • Troubleshooting
    • Workflows
    • How To
    • FAQs


  • Marionette - Objects
  • Marionette - Networks
  • Marionette - Nodes
  • Marionette - Menu Commands

Product Groups

There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me






Found 23 results

  1. I'm using vectorscript/python to make an list of all objects with an certain record and using information from this record. to eliminate human errors I'm starting the script with making the record so I'm certain all names and fields are correctly named. The thing that i can not get working at the moment is making an field in the record with an option module. so an field where you can not type but you have to choose between predefined options. does someone know if this is possible to create? when you make an record yourself in VW this is possible so why not with scripting
  2. Hi all, Coding question for those who write their own nodes. Every time I try to run a node with the (a,b) = vs.TrueTypeToPoly(text) the program crashes - has anyone run into this/has any suggestions? I've attached a simple sample node that creates text and then uses the above command to turn it into poly lines. It doesn't crash if I don't try to assign the output to the tuple (a,b), but also doesn't convert the text. Thanks, Naomi text test.vwx
  3. Hi I am wondering if anyone can advise - I have enabled the reset on move and reset on rotate flags in my PIO, and the handling of these events seems to work correctly when a single PIO is selected. However, if I select other objects along with the PIO, there are some issues. If the other objects are simple objects like rectangles, etc, their 'preview shadows' move as expected while the operation is in progress, but they do not redraw correctly after the move or rotate operation is completed. The other object appears to remain drawn in its old location. But if I move my mouse around, I can find that the object did in fact move / rotate correctly but is now invisible except to selection highlighting. If I select it and change an attribute, the drawing correctly refreshes. The incorrect 'old' object disappears. If I have multiple instances of my PIO selected, and perform a move or rotate, one of them behaves correctly. The others mostly behave correctly, but appear grayed. If I select them and change an attribute or otherwise force a reset, they return to normal. In addition, I sometimes observe drawing objects that were not part of the selection becoming grayed when I perform these operations. Is there something I am doing wrong or a step I need to add?
  4. Wondering if anyone can advise on this - I'm having some trouble with control point precision that is leading to erroneous behavior in a plugin object. I detected this issue in part through the debugger. Basically, when I drag a control point, it seems that the values I get when I access its coordinates from inside the scripting environment are truncated to only 6 decimal places. This introduces error into calculations based on that value. I have tested further by creating an object to use as a snapping location, and setting the position of this object to coordinates that require more than 6 decimal places to represent. If I increase the decimal place precision in the document unit preferences, I can see all of these decimal places in the OIP for the reference object. If I drag a control point in my plugin object to snap to this reference object, and then, by setting a breakpoint, inspect the value I get inside my script by accessing the control point (with, for example, vs.PControlPoint01Y), I see the value is still truncated, regardless of the document unit / precision settings. At only 6 decimal places, this can introduce pretty significant error. Is there some obvious thing I am missing to correct this behavior? I would expect that when I snap a control point to a location, the control point would be assigned a value as accurate as possible, or at least as accurate as the document settings indicate. Not sure if this is specific to Python scripting or not.
  5. So I've created a simple script that duplicates a selected symbol from a pop-up window. I've also added an event script that changes the "Distance" parameter based on the symbol selected. Developer mode is 'off', but I don't understand why when the PIO is executed that it creates a second set of symbols outside of the PIO. That second set of symbols are always in the exact same location in every drawing, regardless of where the PIO is. I've attached a screen shot if it's helpful. Any ideas why?
  6. Hi all, I open this topic because i cannot find how to make custom parametric object for vectorworks such as custom door(with custom profile), custom furnitures etc. Can anyone enlight me for this? If there is need to do with marionette or vectorscript. Where can i find the tutorial? I am newborn baby in Vectorworks, planning to migrate here. Sir @Pat Stanford i tag you here 😉. Thank you
  7. Hi I use a Logitech M570 roller ball mouse with Vectorworks which has some customisable buttons. I have customised the buttons for various standard VW shortcuts but would like to be able to use it to edit the attributes of objects. I can select an object and right click and access a menu with options like edit properties etc none allow me to edit the attributes - ie change the fill or line weight. ( Right click on my mouse is the same as pressing control then clicking on the object ) I can input a short cut to open and close the attributes palette but this does not allow me to edit the attributes of a selected object. Does anyone know how I can create a shortcut I can put into the mouse so I use a mouse button to select and edit the attributes of a object? I suspect I need a VW script to make the shortcut but am not familiar with scripting. Thanks
  8. Hello, I am glad that I can see some evolution in my skills. And thanks to this forum I can manage more tedious work easy and nice. In reward here is the first really useful script in vectorscript. It creates some layers all together with date and different text. I hope you enjoy. Notes: -If the layer exist give back an alert and do not create the layer. {/////////////////////////////////////////// CreateDifferentNewLayers V 1.3 with extra separation layer with date By Ing. Victor Garzon (2018) distribute freely avictorgm@gmail.com Using as codebase from Vectorworks: (c) 2001 Nemetschek North America. Distribute freely. ///////////////////////////////////////////} PROCEDURE CreateDifferentNewLayers; VAR newname : STRING; Rahmen : STRING; LayA : STRING; LayZERO : STRING; LayB : STRING; LayC : STRING; LayD : STRING; LayE : STRING; LayF : STRING; LayG : STRING; LayH : STRING; TextoAlert :STRING; Texto1 :STRING; Texto2 :STRING; ch : HANDLE; BEGIN Texto1:= 'The Layer for the Stand '; Texto2:= ' will be created at the top of the list'; newname:= StrDialog('Enter name of new layer:','Untitled Layer'); LayZERO:= Concat('-------', newname, Date(2,1), '--------------------'); IF NOT DidCancel THEN BEGIN ch:= GetObject(LayZERO); IF (ch = NIL) THEN TextoAlert:= Concat(Texto1, LayZERO, Texto2); Layer(LayZERO) END ELSE AlrtDialog('Layer Layers created already exists.'); LayH:= Concat(newname, '_8_Frei'); IF NOT DidCancel THEN BEGIN ch:= GetObject(LayH); IF (ch = NIL) THEN TextoAlert:= Concat(Texto1, LayH, Texto2); Layer(LayH) END ELSE AlrtDialog('Layer name already exists.'); LayG:= Concat(newname, '_7_Standfläche'); IF NOT DidCancel THEN BEGIN ch:= GetObject(LayG); IF (ch = NIL) THEN TextoAlert:= Concat(Texto1, LayG, Texto2); Layer(LayG) END ELSE AlrtDialog('Layer name already exists.'); LayF:= Concat(newname, '_6_Traversen'); IF NOT DidCancel THEN BEGIN ch:= GetObject(LayF); IF (ch = NIL) THEN TextoAlert:= Concat(Texto1, LayF, Texto2); Layer(LayF) END ELSE AlrtDialog('Layer name already exists.'); LayD:= Concat(newname, '_5_Lasten'); IF NOT DidCancel THEN BEGIN ch:= GetObject(LayD); IF (ch = NIL) THEN TextoAlert:= Concat(Texto1, LayD, Texto2); Layer(LayD) END ELSE AlrtDialog('Layer name already exists.'); LayE:= Concat(newname, '_4_Punkte'); IF NOT DidCancel THEN BEGIN ch:= GetObject(LayE); IF (ch = NIL) THEN TextoAlert:= Concat(Texto1, LayE, Texto2); Layer(LayE) END ELSE AlrtDialog('Layer name already exists.'); LayA:= Concat(newname, '_3_Maße_Lasten'); IF NOT DidCancel THEN BEGIN ch:= GetObject(LayA); IF (ch = NIL) THEN TextoAlert:= Concat(Texto1, LayA, Texto2); Layer(LayA) END ELSE AlrtDialog('Layer name already exists.'); LayB:= Concat(newname, '_2_Maße_Punkte'); IF NOT DidCancel THEN BEGIN ch:= GetObject(LayB); IF (ch = NIL) THEN TextoAlert:= Concat(Texto1, LayB, Texto2); Layer(LayB) END ELSE AlrtDialog('Layer name already exists.'); LayC:= Concat(newname, '_1_Maße_Träger'); IF NOT DidCancel THEN BEGIN ch:= GetObject(LayC); IF (ch = NIL) THEN TextoAlert:= Concat(Texto1, LayC, Texto2); Layer(LayC) END ELSE AlrtDialog('Layer name already exists.'); END; Run(CreateDifferentNewLayers);
  9. When adding scripts to worksheets, there is a dialog box that pops up every time saying would you like to block or execute scripts in this worksheet? Question: Can we somehow block or execute this option, through a script?
  10. I am working on a simple Dialog with a set of Radio Buttons - depending on the selection, the script will perform different sub-procedures. I can't find a VS command to get the selected Radio Button. Any suggestion? thanks in advance! Giovanni
  11. This would essentially be a Boolean parameter for PIOs which does not look like a check box. It could have two script loaded images (tool resources?) to display in the OIP to indicate the state of the button and return TRUE/FALSE. The same concept applied to a Radio Button parameter. Each choice having the ability of displaying one of two images (no text or radio button). Default image = non-selected, Alternate image = selected option. This could possibly lead to additional functionality of being able to select more than one option. This could be achieved by passing indices or Boolean flags back to the script. A PIO script can easily parse the result via a case statement. Once UTF-16 is fully implemented there maybe sufficient glyphs available that a button outline with text embedded will be able to convey the desired thought. The outline or background would alter to convey select state. Please ignore if this is in the current version. This office is using VW2013
  12. Greetings all, Functions mentioned in title [vs.GetProjectUserNames(), vs.GetResourceTags()] return NoneTypes, not sure whether this is broken. From the DevWiki: http://developer.vectorworks.net/index.php/VS:GetProjectUserNames Description : Get a list of userids that are part of the current project. def vs.GetProjectUserNames(): return (BOOLEAN, userArray) userArray | ARRAY : Array of userids as strings However, upon running this in a Project File, I get a Boolean of True, but a NoneType for userArray. Not sure how to iterate through list of results. This is the same with vs.GetResourceTags(): From the DevWiki: Description : Gets the tags attached to the specified resource. def vs.GetResourceTags(handle): return tags tags | ARRAY : Array of tags Running this on Symbol Definition handle, with tags attached yields a NoneType as well. The Symbol Definition has got tag(s), and running vs.GetNumResourceTags(some_handle) returns the correct number of tags attached to this resource. Any insight would help, @orso b. schmid/ @Pat Stanford
  13. I’m using VW2017 with Spotlight and I use the ‘rotate left 90 degrees’ command as a keyboard shortcut a lot. I’d like symbols to automatically rotate around their insertion point but mine don’t when I’ve got a label legend applied to them. When the label legend is applied the symbol rotates around the centre point of the symbol and the legend combined instead. I've explored using a vectorscript to help here but haven't got enough knowledge to make it work. I've noticed when I insert a locus on top of the insertion point and highlight both the symbol and the locus, the symbol will rotate around the locus. Could a script: insert locus on insertion point, rotate left 90degs, delete locus? Many thanks in advance!
  14. Hi all, I am creating a Linear plug-in object, and trying to catch and respond to the event where a user changes the LineLength by moving one of the two built in control points of the object. However, I cannot seem to figure out what event / state change this qualifies as. The vso states I know of are: vs.kCreatedReset = 0 vs.kMovedReset = 1 vs.kRotatedReset = 2 vs.kParameterChangedReset = 3 vs.kObjectChangedReset = 4 vs.kLayerChangedReset = 5 vs.kExitFromEditGroup = 6 vs.kObjectNameChanged = 7 Below is an example of some code I have used to try to detect this state change. Alerts appear as expected for move, rotate, attribute change, and parameters changed either in the OIP or by moving an added Conrol Point parameter in the drawing, but when I drag the two points that are actually built in to the PIO, although I do receive 3 for the event, triggering the ResetEventHandler in this case, no alert fires off for any of the checked state changes. It seems that this state change is not one of those listed above. I expected it to be a Param change along with possibly a rotation and position change, depending on which of the two points was dragged. Can anyone advise on what state I need to check for, and how I can capture the new and old value for line length, rotation, and position that could have been adjusted by this action? def execute(): global objname, oh result, objname, oh, rh, wh = vs.GetCustomObjectInfo() theEvent, message = None, None theEvent, message = vs.vsoGetEventInfo() if theEvent == vs.kObjOnInitXProperties: #5 #enable eventing for this plug-in vs.SetPrefInt( vs.kParametricEnableStateEventing, 1 ) #590 result = vs.SetObjPropVS(vs.kObjXPropAcceptStates, True) #18 elif theEvent == vs.kObjOnAddState: #44 message = vs.vsoStateAddCurrent( oh, message ) elif theEvent == vs.kParametricRecalculate: #3 ResetEventHandler() def ResetEventHandler(): global objname, oh if vs.vsoStateGet( oh, vs.kCreatedReset ): vs.AlrtDialog("Object Just Created") if vs.vsoStateGet( oh, vs.kMovedReset ): vs.AlrtDialog("Object Just Moved") if vs.vsoStateGet( oh, vs.kRotatedReset ): vs.AlrtDialog("Object Just Rotated") if vs.vsoStateGet( oh, vs.kParameterChangedReset ): vs.AlrtDialog("Parameter Changed") if vs.vsoStateGet( oh, vs.kObjectChangedReset ): vs.AlrtDialog("Object Changed")
  15. Hi , I'm just messing a bit around with Vectorscript.( I'm completely new to this, and try to do my first steps...) As a start I wanted to create a script that moves all selected items to the origin, but Im not very sucsessful in this. Here is whatI have so far: PROCEDURE MoveZero; VAR h : HANDLE; BEGIN h:= FSActLayer; HMove(h, 0, 0); END; Run(MoveZero); My questions: 1.) FSActLayer chooses only the first object on the active layer, how do I choose all selected objects? 2.) HMove(x,x,x ) moves only relative to the current location, what is the command to move to a certain point ? Thanks for help...
  16. I would like to know the largest orthogonal rectangle to fit within any handled polygon or polyline. Within that one might fit a textblock or other. Could I script this using VectorScript?
  17. Greetings all, I'm trying to wrap my head around, showing an image in dialogue. I see this function call: def vs.CreateImageControl2(dialogID, controlID, widthInPixels, heightInPixels, imageSpecifier): return None ..but can't get it to work. The issue is with the 'imageSpecifier' parameter. Looking at other posts, https://forum.vectorworks.net/index.php?/topic/41757-2014-script-will-not-run-in-2015/&do=findComment&comment=209508 @klinzey instructed the use of a folder named _some_name.vwr, with your image in there, and use that path for the imageSpecifier. However, what if you want your image structured down the folder channel the same way your plugins are structured. Eg AppData |-- Roaming |---- Nemetscheck |------ Vectorworks |-------- 2016 |---------- Plugins |------------ TuiPlugins |-------------- PluginImages |----------------| rectange.png |-------------- Rectangle.vso full_image_path = "TuiPlugins\PluginImages\rectangle.png" def CreateDialog(): -- vs.CreateResizableLayout(etc,etc..) -- vs.CreatePullDownMenu(etc,etc..) -- vs.CreateEditText(etc,etc..) -- vs.CreateImageControl2(dialog, k_image , 200, 200, "{}".format(full_image_path)) can this be done? Or does the folder have to have the .vwr characters appended to it? And can the location of this *.vwr folder be placed further down? Hope this makes sense
  18. I've been scouring the internet for any indication as to how to go about creating a record format that auto-populates the extrusion length of a symbol...and I've had no luck. But I just saw this script posted on another topic: https://forum.vectorworks.net/index.php?/topic/46334-help-with-auto-record-formats-fields/ and I was wondering if anybody could help me alter this to work for my purpose. I have a number of 2D shapes that I often extrude and then make into symbols. These symbols then act as the structures of trade show displays that I help design. As there are a number of similar objects in these structures, I'd love to be able to run a report that includes the length that I've extruded the symbols. Or any other suggestions as to how to get a similar result would be greatly appreciated. Thanks!!!
  19. Hello, all. Looking at the VectorScript function reference I see no functions that could tell whether a given polygon/polyline is self-intersecting. The only function that is told that it is the VS:OffsetPoly. But I don't want to see if a polygon/polyline is self intersecting as a side effect of an operation that actively acts on the selected object but just a read-only operation whether it is self-intersecting or not. Any suggestions are welcome.
  20. I would like to be able to export to pdf from a script without having to prompt the user to choose pdf settings and a location or filename for the files. Currently the only way to do it is to call these functions like this: vs.AcquireExportPDFSettingsAndLocation() vs.OpenPDFDocument(inFilenameStr) vs.ExportPDFPages(savedViewNameStr) vs.ClosePDFDocument() Could we we have an alternative to the first function like this: vs.SetExportPDFSettingsAndLocation( location, dpi, blah, blah, etc)
  21. Hi All, I'm trying to work through a bunch of contours imported from GIS information. These contours are all sitting on z=0 and all have an elevation value in their records, but there are thousands of separated lines so elevating all by hand is a large job. I have set up some scripts to select these contours separately, but I would like to add to these scripts, by adding a line that sets the z-value of the selection to the elevation value in the record. I don't need it to be smart or anything.. I just want to know a script that can specify a z-value to multiple 3D Polylines. Help? Thank you in advance. Nick Mac OSX 10.11.6 Vectorworks Architect 2016
  22. From this previous post by me Viewport Class Overrides and the like If you allow a hook into the line type and pen thicknesses at least, it would save us heaps of hours having to select a viewport and pain-stakingly scroll through 100's of classes to find the one your looking for and override it. Also using the eyedropper for VP class overrides and visibilities is ok until you have two viewports that you want to eyedropper a single class' properties across without carrying properties of any other class. You can't do this, which we need to be able to do. If there was such a function through VS/Python/SDK we could fix this ourselves. How do we go about asking for additional functionality to be added to the scripting language? or SDK? Is it through here - Wishlist forum? Kind regards Tui
  23. Greetings all, Trying to figure out how to access viewport class overrides through vectorscript. So far all i've found on the developers wiki are GetVPClOvrdCount GetVPClOvrdFillBack GetVPClOvrdFillFore GetVPClOvrdFillOpty GetVPClOvrdName GetVPClOvrdPenBack GetVPClOvrdPenFore GetVPClOvrdPenOpty Which seemingly addresses fill front/back and opacity together with the pen front/back and opacity. What about line types/pen thicknesses/textures?


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.

  • Create New...