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


Forums

  • 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
    • Rendering
    • Workflows
    • Buying and Selling Vectorworks Licenses
  • 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

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

Found 16 results

  1. 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);
  2. 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?
  3. GioPet

    Radio Button 'get-command'

    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
  4. 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
  5. 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
  6. 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!
  7. 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")
  8. 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?
  9. 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...
  10. 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?
  11. 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
  12. Displaythan

    Record Format Scripting

    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!!!
  13. 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.
  14. 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)
  15. 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
  16. 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

 

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.

×