Jump to content

Search the Community

Showing results for tags 'vectorscript'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Calendars

  • In-Person Training - US
  • In-Person Training - UK
  • Coffee Breaks
  • Essentials Seminars
  • Webinars
  • Community Groups

Categories

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

Categories

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Occupation


Homepage


Hobbies


Location


Skype

  1. 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
  2. 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
  3. 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
  4. 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!
  5. 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")
  6. 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...
  7. 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?
  8. 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
  9. 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!!!
  10. 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.
  11. 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)
  12. 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
  13. 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
  14. 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?
×
×
  • Create New...