Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

6 Neutral

About AlHanson

  • Rank

Personal Information

  • Occupation
    Entertainment Designer
  • Location
    Minneapolis, MN
  1. ...Or using 159 does in fact work. Not sure what I did incorrectly the first time, but it's working now after another attempt. Love it when I solve problems by opening and closing the program...
  2. Not sure how much of this will be the same for 2016 as I know a lot of things were renamed and added later. You're looking for the Popup node. You'll have to Edit it with some minor changes to customize it though. 1-Remove the line at the very top "#COMMAND;READONLYREFFILE;[VWLibDef]/Input\PopupWidget.py;" (This is basically here to lock the node as read only) 2-Change the existing choice list. Keep everything in single quotes to establish strings and you can add more entries by separating them with a comma. This node only gives you Integer values for the item you select from the pop up. @MRoth has provided an excellent modified Pop up node that also provides the string text here:
  3. Continuing to mess around with this- I did find that using int 159 is actually the better usage for the Get function to retrieve just the Title without the Number. Doesnt seem to do anything to help the Setting problem.
  4. I'm attempting to make some nodes for interacting with a Sheet Layer's Sheet Title. I've been able to make the Get Title function work correctly (Although this does also grab the Sheet Number- any way to avoid this outside of scripting its removal?) but I can't seem to get the the Set function to work. I've also tried to just replacing the variable I've created with a string value without success. Here's the code as I've cobbled together and VWX is attached. Sheet Layer Marionette.vwx @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( 'Set Sheet Layer Title' ) this.SetDescription( 'Retrieves the sheet title from a sheet layer' ) #Input Ports obj = Marionette.PortIn(vs.Handle(0), 'hLayer') obj.SetDescription( "The input layer object") string = Marionette.PortIn( '[Sheet Title]', 'sTitle' ) string.SetDescription( 'The sheet layer title' ) #OIP Controls #Output Ports layer = Marionette.PortOut('hLayer') layer.SetDescription( "The handle for the layer" ) #BEHAVIOR def RunNode(self): #inputs x = self.Params.obj.value title = self.Params.string.value vs.SetObjectVariableString(x, 162,title) #script #outputs self.Params.layer.value=x
  5. Bah, of course it's that easy. Too busy staring at the field names on the fixtures and not thinking about what the record name is actually using. At least it a simple fix. Thanks!
  6. I'm using the Get Record Node to pull information from Spotlight Lighting Fixtures, and I'm getting everything I try just fine with the exception of Instrument Type which just returns a blank string. Anybody know what would cause this? Image and test file attached. MarionetteLightRecords.vwx
  7. I've been using the Ordered List along with the Concatenate Node to combine strings for my tools for a while now and have never had any issue with it. Recently, I've been having trouble getting this to function correctly as it has started giving me a list style string. In this example I'm just trying to create a simple #/# value display- just a simple / between two string values. I should be getting 1/23 from this however I'm getting ['1', '/', '23']. I've generally been working with the ComputerWorks Easy Text node, so I checked this against the stock Text node and the problem exists here too. The weird thing is that if I go back to my tools that have used this exact same method to generate text and copy/paste the Ordered List & Concat nodes into the file they work just fine and produce the previously expected results. Checking the script in the newly inserted nodes versus the copied node shows no difference- they match up exactly. Example file attached. Very confused with this and looking for some help or guidance on a better method for building strings? TextConcat.vwx
  8. The Set OIP node does not appear to function when the OIP Name has a space in it. Is there any trick to using Field Names with space to get the space to process? EDIT: Figured it out- just a simple underscore will replace the spaces just fine. Great node btw!
  9. It would be great to see the face counts of Mesh objects in the OIP for the mesh rather than having to go edit the mesh or find this number in the Simplify Mesh command.
  10. Is there any way to directly access the secondary units that are configured within a document via Marionette? For example, I'm playing with a script to basically recreate the existing Scale Bar tool, but using dual dimensions (feet on top, meters on the bottom). It's easy enough to build this using basic math conversion for a set secondary unit or manually typing the secondary unit in to convert the dim value, but it would be great to directly tie this to the defined secondary units for flexibility and to see those units displayed properly in the OIP. Digging through the DIM node's code it appears that this could be a simple matter of changing the value in the line "units = vs.GetPrefReal(150)" to "units = vs.GetPrefReal(200)" per the VS:Function Appendix (http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix_F#Secondary_Units_Selectors) but that doesn't seem to work for me, so I guess it's actually tied to the current OIP Marionette.WidgetType.RealCoord implementation?
  11. I'm looking for a way to have calculated information appear in the OIP, ex making a simple grid object that will display the total number of points in the OIP. For a simple 10x10 grid text like "Total Points: 100" would show. Looking through the Marionette Implement a Node guide (http://developer.vectorworks.net/index.php/Marionette_Implement_a_Node) seems to point toward a Static Value if I'm understanding what I'm looking at correctly. I lack any real python knowledge and my attempts to use other nodes for reference to create a node aren't working for me. Is this the correct direction, and is there a way to implement this function into a marionette object that I'm not finding? Assuming I'm heading in the right direction here, is there any way to implement this as a stand alone node that can get values plugged into it within the network? I'm surprised to not find any current implementation for all the OIP functions in the node library. I was ecstatic to stumble across the Separator Node in @sbarrett's Festoon Strings object, and working with that has been a game changer for a lot of my little projects. It would be lovely to have easier access to similar functions in the OIP. Will nodes like this eventually end up in the main Marionette library?
  12. I've experience all these issues as well working with Marionette. Haven't found any common cause or timing, it just feels like it becomes gradually corrupted to the point of being completely non functional until Vectorworks is closed and restarted at which time everything seems to return to normal.
  13. Thanks for the all the help everybody. Just understanding what to expect makes a big difference in planning and troubleshooting!
  14. I've been encountering this with the If node on many of my marionette projects and I'm struggling to understand if this is normal behavior and the list handling just doesn't work the way I'm expecting it to and I should be approaching my scripts differently or if this is a bug. Any help explaining this to me would be appreciated! I've attached a screenshot with a very simple example to explain. I've been trying to set up simple toggles using the If node and a Boolean or Popup node to control the output. I have 2 different lists of different lengths, one with 10 items and one with 15 items for example. Regardless of the Boolean status the resulting list is always as long as the list with the larger number of items and the last value just gets continued to fill out the maximum list length. Why does the result not just return a list of the 10 items in the True result? Is this a bug or am I just not approaching python script handling correctly? For this simple example I understand that I could just put the if nodes on the input values to the Series node to avoid this, but I there's not always a clear work around on some of the more complex scripts I've been playing with.
  15. I'm having an issue with all the marionette objects I've been building lately where moving a 2D control point resets all other OIP parameters to the default settings. This happens to me program wide and isn't limited to any single file or script. Is this a bug or a 'feature' that I'm just not understanding? Is there a way to prevent this?


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