Jump to content

Search the Community

Showing results for tags 'pio'.



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
    • 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

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


About Me


Occupation


Homepage


Hobbies


Location


Skype

Found 10 results

  1. Hi, sorry, but I cannot find out how to write my marionette object's parameters into database records (or worksheet cells), which was my reason to create them – can someone point me in the right direction? I wasn't able to find example scripts ... My objective is to create a door schedule that uses simple, 2D, self-made, non-IFC door symbols with data stamps, to be placed on 2D-drawings (draftsperson does not use walls, just lines). Most parameters will be strictly database records that never appear on the drawing, but WIDTH, WALL THICKNESS, and OPENING DIRECTION (L/R) should be 'hard-wired', i.e. taken from the plan, in order to avoid common mistakes. My first approach was to calculate opening WIDTH and wall thickness from the bounding box of the door symbol/group. This works fine, but only as long as the wall layout is strictly cartesian and the doors are not rotated or mirrored. Also, we would like to use door symbols that are larger than the opening width (including frames etc.), so we would no longer be able to calculate the width from the bounding box, wich seems to be all a worksheet can access. Or is there a way to access data from objects INSIDE a group that is listed on a worksheet? So I created a marionette object that draws the door opening based on parameters, because I expected it would be easy to access those parameters from a worksheet or to write them to an attached database record ... but I find that task surprisingly difficult. Am I missing something? So far, my marionette network, run as a wrapper, can draw a door based on two parameters OPENING WIDTH and WALL THICKNESS, and attempts to attach a pre-defined database record to that object, where it correctly fills the fields for wall thickness and opening width. However, the result is a simple group (not a PIO, so it cannot be manipulated by parameter later), and it is nested twice in otherwise empty groups, unnecessarily. If I convert the wrapper into an object node, it becomes the expected parametric plug-in-object that I can modify later, but it does not attach a database record to itself or writes its data to a record that I attach manually. What am I doing wrong? test door database.vwx this is what the door symbol plus tags should look like this is my marionette object node (so far, without tags, but okay ... if it only wrote to the database !!!
  2. Here's what I'm trying to do: User selects an object User then selects the PIO tool and inserts the PIO PIO uses info from the selected object as a parameter value. Currently: I get the handle to the user selected object using LSActLayer or FSActLayer. Use GetRField to extract the information from the object. Run GetCustomObjectInfo to get the PIO handle Write the information to the PIO using SetRField The problem I'm having is that it appears that a PIO resets(vsoGetEventInfo #3) itself 3 times before the creation is finished. On the first reset event the handle still points at the user selected object, on the second reset event the handle is empty, on the third reset the handle points to the new PIO. Short of writing the information to a file how do I get the information from a user selected object into a PIO on creation?
  3. How come if I use the the "AutoHybrid" I lose all ability to use the PIO data? Catch-22 - Can't make an AutoHyrbrid of a Symbol and keep the data - Can't make an AutoHybrid of a Group to make a symbol with data am I missing something?
  4. So I found a cute Compass I want to use for a North Arrow. I use the North Arrow tool and see 10 "Configs" I see the "North Arrow" file in the Resources Browser. I Edit that file and see 27 existing arrows - now 28 with my new one. How do I change the "Configs" to use one of the other 27 arrows? Thanks 🙂
  5. I know to get and reset the value of a PIO parameter instance using GetRField and SetRField but what is the route to rebuilding the "choices list" of a particular parameter field? I don't suppose it is unique to the PIO instance but probably a global to the PIO definition. Would GetObject and SetObjectVariableString be the route? There is no SetPluginChoice or SetCustomObjectChoice is there? Or do I just need a handle to the PIO definition and use SetRField? And is this separator for the entries in the choices list or is it indexed somehow? &div& Larry
  6. Hi, wondering if anyone has encountered this or knows of a solution: When I enable custom object info palette for a plugin object with vs.SetObjPropVS( vs.kObjXPropHasUIOverride, True ) #8 I find that trying to change the value of radio buttons in the object info palette crashes vectorworks. I have inserted all of the widgets with vs.vsoInsertAllParams() I'm not trying to do anything crazy; I am really just trying to get some separators onto the OIP. I am handling Event 41 as guided by the wiki: ... elif theEvent == vs.kObjOnWidgetPrep: #41 UpdateParametersState() ... def UpdateParametersState(): vs.vsoSetEventResult( vs.kObjectEventHandled ) #-8 Changing the value of other parameters in the OIP, including numeric fields and checkboxes, works fine. Most importantly, I see the same behavior when I try the example plugin provided at http://developer.vectorworks.net/index.php/Python_Sample_Point_Object_(complex) If I click the radio button for Male / Female in this PIO's info palette, vectorworks crashes. This leads me to think there is more going on than bad code in my own object. I am running VW2017 SP4 on Mac OS X El Capitan
  7. Hi, wondering if anyone has any advice -- Sorry for the cross post; I was in the wrong topic area before. I have a plugin that includes a control point that is draggable, but which also exposes one of its coordinate input fields in the OIP to allow the user to type a precise value. When the user origin has been dragged, typed values in this field get offset in ways that lead to "incorrect" values, but dragging the control point behaves as if the current User Origin is the Internal Origin. I imagine I could use GetOrigin() to find the offset and fix this behavior, but how do I detect whether the parameter changed from a drag operation (in which case I should leave it alone) or a typed value in the OIP (in which case I need to fix it)? Or is there a way to get Control Points to only look at the user origin? (the documentation on plugin parameters would suggest not) thanks
  8. 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")
  9. Hey All, So, I'm working on implementing a Custom Object in python that I want to have Events enabled for. I understand the I need to use vsoGetEventInfo function to get the Event ID and any related info (Control ID, Button ID, etc)...my question is, if there a list somewhere of all of the possible Event ID Integers and descriptions of what each of them are? I've tried looking through the dev documentation and I've found a few scattered here and there in various examples but I have been unable to find a comprehensive list. Does anyone either know where one of these is or has a list that they can post? Cheers, -gonda
  10. Is it possible for a PIO to receive an event when a user switches to a layer containing the PIO? Thanks Will

 

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