Jump to content


Vectorworks, Inc Employee
  • Content Count

  • Joined

  • Last visited

Everything posted by sbarrett

  1. Hello all, the first webinar will be at 11:00 am EST on January 18 and will occur periodically until February 22, if you want to learn more about Marionette you should definitely attend! We will send out the recorded webinars after each session to the registered attendees, so even if you cannot make it to the live session, you should still register. If you still have questions after the live webinars, please post them here. We will do our best to address them in the following sessions. I hope you can attend! Register for the next Marionette Monday webinar HERE! Video Links: Demo Files: Marionette_Webinar_I_v2017.vwx Marionette_Webinar_I_v2016.vwx Marionette_Webinar_II.vwx Marionette_Webinar_III.vwx Infographics.vwx Marionette_Webinar_IV.vwx If you choose to view the webinar in its entirety, please take a moment to complete this survey to provide feedback directly to its creators: Survey For your convenience and for easier searching later, the Q&A has been transcribed here as well as answers to a few questions that were not answered during the webinar itself: ----------- Webinar Part I: Introduction Are there practice classes/tutorials? There are a few tutorials with exercise files on the Vectorworks Knowledge Base. There are also resources on our community forum. Can Marionette automate tedious tasks? Marionette is great for automating tasks. Today we only showed how a network could build geometry, but there are many other things that Marionette can do, such as querying a document, analyzing an object, or auto-filling names and object numbers, just to name a few. Can Marionette randomize? Yes. Marionette has a random node and we will be showing how it works in a later webinar. Is it better to use Dim Nodes or Real Nodes? When you are drawing real world objects like walls and slabs etc, I would recommend using Dim nodes. Also if you are planning to share networks with other people who may not be using the same document units you may want to use Dim Nodes. Otherwise, Real Nodes are fine. The important thing to remember is not to use BOTH Dim nodes and real nodes for measurements in the same network. How would you use an existing point as the origin of your rectangle? In the example we showed, a Point2 Input Node was used to create the origin of our rectangle, but it is easy to attach a point that already exists in your network. Instead of using a Point2 Input Node, you can use a Point 2D Node from the Points category. This node has inputs for the x and y values so they can be taken from the output of another node in your network. If you want to base the point on an existing locus point, you can name that locus just as we named our polyline, and attach it to the definition with a name node. Then you can use a Get Location Node from the Locus category. This will turn your Locus into a point. Can you replace the locus points in the point grid you made with other objects like symbols? Yes, you can replace them with pretty much anything. The points that are generated by the network can be used as the center points of circles, the origin points of rectangles, or the insertion points of symbols. Can we set a distance from edge to restrict points from hitting the poly edges? Yes. There are probably several ways to do this, but the way I would do it is to create an offset version of the referenced poly with the Offset Poly Node and use THAT poly with the Is In or On Poly Node. What's the Boolean output in the 'is in or on poly' node? In scripting languages, Boolean is a term to describe either/or – a Boolean is always True or False. Any Conditional Node (a node that has “Is” in the title) always has a Boolean output. (Conditional Nodes are another type of data manipulation node that we will talk more about in later webinars.) In this case, the Boolean output is a list or true or false values that coordinates with the list of points that were supplied to the node. This true false list can be used with the Filter node to cull that list of points of false values. Usually this is the only output for this type of node, but this node also filters the list of points for you – that is why we used that output. Is there a way to reverse the 'is in or on poly' node to only include points outside the polyline? Or is that a different node? Sometimes nodes don’t do exactly what you want, but there are almost always ways to use them with other nodes to make them work for you. In this case, I would do this by using the Boolean output instead of the point output, using an If node from the data flow category to change the true values to false and the false values to true, and then applying this list to a filter node along with our original list of points. This may sound a little confusing written out like this, so I will try to touch on it in a later webinar. Can you explain more about the difference between point and locus ie is the point only for calculations the locus is for placing an object? A “Point” is a data type that can be manipulated in Marionette. It consists of 2 or 3 dimensional values intended to represent a position in 2D or 3D space. The difference from the “Vec” types (2D & 3D) in Marionette is that Vecs consist of “Real” values which are unit less while Points are always in document units. “Loci” are an actual Vectorworks drawing object. The “Locus” nodes (2D & 3D) in Marionette take Points (positions) and create Loci in the drawing. Loci have a position that could then be extracted using a “Get” node. This is a graphical programming language - how can we get details like required parameters of an input variable - like int vs real for a rectangle? In C++ I would look to the definition of a variable to get this - where in Marionette? Each node has a button in the OIP “Description” that lists each of the ports and what type of data its looking for, in addition to some explanation on what the node’s function is. I want to model shipping containers for housing with modifications for the use situation (Left or right hand, sizes of openings etc. This would be a really cool example of putting Marionette to use on modular architecture. Each container could be generated as a self-contained plugin object, or you could have a network that takes some input parameters, i.e., 20’ or 40’ container opening size and number of openings. And the result of the network would be the container geometry in the drawing, made from extrudes and other VW primitives. You could then further manipulate the containers manually. Sarah will be covering some of the required concepts over the next few sessions. As you update nodes/update marionette, how will that integrate into our existing networks/marionette objects - especially if we've edited or created our own nodes? Currently each instance of each node is completely independent and contains its entire script. So, if you place several copies of a single node type in a drawing and then change the script inside one of them, the others will be unaffected. This makes it really easy to play around and develop new nodes without fear of problems with existing networks. It also however poses challenges for maintaining libraries of nodes for sharing, etc. We are currently working on providing the best of both worlds in the future. I am looking for a way to manage numerous focus points in Spotlight. I would like a formula to move groups of points to new positions, instead of changing each light to a different point each time I change a scene to render. I imagine the solution to this would be similar to the simple example Sarah gave in the webinar today. Here are some thoughts, there is a node “Objs by Crit” in the library. You could use it to filter all or some subset of focal points in the drawing. Once you have the focal points you can easily move them to an absolute position using one of the nodes in the “Operations” category. Are we going to be able to manipulate building objects such as walls, windows, doors etc.? The library contains nodes for creating and manipulating Walls, Roofs & Slabs. How can I put a wrapper into a palette so I can make a custom tool set for myself? A custom node can be put inside a symbol definition which will automatically make it available from the Marionette tool popup. Files saved with nodes in symbols can be placed in the user’s library. These can then be accessed from by the Marionette tool. What are the best places to get/share Marionette material? i.e. The Marionette tutorials at the Knowledgebase, the Marionette area of the Techboard, etc. These are a good place to start: http://kbase.vectorworks.net/questions/1350/Marionette+Tutorials https://techboard.vectorworks.net/ubbthreads.php?ubb=cfrm&c=10 http://developer.vectorworks.net/index.php/Marionette Can Marionette be used to generate custom Hatches? We have not created a library of nodes for creating or editing Hatches yet. The functions for doing this are exposed to the VW Python API which means this would be easy for someone in the community to implement and share. Is Marionette specific to Vectorworks Architect? No, Marionette is available in any Vectorworks module. What version of Vectorworks is Marionette in? Vectorworks 2016 How do you turn a network into a script, and can you place it in a script palette? You simply right click on any node, then use Save Marionette as Python Network, then name the file and it will be saved as a .py file. How do we know the kind of input to apply to a node? Look at the names of the input ports. It isn't always blatantly obvious, but you can normally infer what you will need. If you are still a little confused, click Description in the Object Info Palette and the inputs will be explained there as well. ----------- Webinar Part II: Intermediate How does one put a custom curve, i.e. taken from a site plan, for example, into Marionette as an input? She will cover this at some point, if not in this session then in the next. There are a few ways to do this. You can use the "Name" node from the input node category to get a named object from the document. You can also package a curve or any other object into a standalone PIO as control geometry. If you have no start input for a series object, does it start at zero? Yes Can you change the wrapper class without unwrapping and rewrapping? Yes, you can change any of the attributes in the attributes pallet also. Just like redefining the class for any VW object? Yes How long did it take Sarah to be that proficient with Marionette? Good question. Sarah came to Vectorworks already having experience with Grasshopper in school, so the answer to this question probably needs to be qualified, as they are very similar in concept and approach. will you share that appendix page please? http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#objects What is the best approach to start implementing algorithmic design in to your daily practice? I think to look for places in your practice that would benefit from automation. Repetitive tasks. Save your energy for design. Does the C convention mapping true/ false to 1/0 apply to Marionette booleans? Marionette uses Python convention. True and False are values of a proper Boolean type. Your list of object type is all CAPS- significant, or not? Not. How do we know the default values in a function? If you open the node they are listed in the script and also in the description. What is the output of "Ungroup" - does it name each rectangle? The output of the "Ungroup" node is a list of object handles -- in this case, handles to a bunch of rectangles. You only have to select one node in a network to create a wrapper for the whole thing? Yes, it will find the rest Can wrappers with the same name that are not symbols actually be different? The name of a wrapper is just a title. So, yes there would be no naming conflict. Can a wrapper be made from multiple wrappers? Yes, they can nest to any depth. ----------- Webinar Part III: Advanced I Thought I'd get my question in early; When creating a 2D polygon (or 3D polygon for that matter) how do you instruct what order the points are created? The best way to assure the order of the points would be to use an ordered list node as the input to the poly node. Can you set a condition that limits the minimum distance between adjacent rectangles? Yes. One way to do this would be to take the sum of the first rectangle’s width and the dimension you want between the two rectangles. If you wanted to space them horizontally, you would use that value as the “x” for your creation point on the second rectangle. where would you recommend going in order to learn the basics of marionette? The Marionette forum hosts many posts from users and employees, such as Sarah and Marissa. It is a great platform for asking questions and reading already discussed topics, as well as seeing examples posted by the community. Will you submit to AIA for previous seminars? Yes, Marionette Monday, Part 2 was available for 1 AIA LU. If you attended live, please follow this link to provide us your AIA number and we will submit your credit: www3.vectorworks.net/Marionette_2-1-16_credit_submittal. If you were unable to attend Part 2 live, you can take this test to earn your credit: http://tinyurl.com/z2u7s8o After creating a network and saving it as a symbol in your personal library, is it possible to send a completed network to another computer? Yes, nodes, networks and networks in symbols all get saved in files like other VW objects. The files can be shared freely. When you input your data request, is there a dropdown list of the records available, or do you just have to know exactly what to type? Currently there is not a dropdown list of fields for the records. You would have to know what the field is, however the Data tab in the OIP can help you determine some of this information. Are there any "output" nodes that can be used to display (non-editable) info, such as the results of mathematical operations, in the OIP? Currently there is no way to display labels in the OIP. There are other ways of showing this information, though, such as the “Print List” node Sarah used in today’s webinar, which will display the information on the drawing area. When creating the symbol, why not convert to group? In this case she was using the symbol definition inside of the plugin objects. So, by changing the symbol definition, she can change the script for all the objects in one shot. If you were to convert to group when you inserted, the network would no longer be attached to the symbol definition, which would prevent it from updating when the symbol is edited. Is there a way to programmatically get a list of all the fields in a record? In short, yes. You could essentially loop through a record and output each field that exists in that record. This would be a great question to share on the Marionette forum, and I’m sure someone could give you an example. ----------- Webinar Part IV: Advanced II Hello all, I just wanted to give everyone an update on the info given in the last webinar. At 12 min. 30 sec. of this webinar, I say that the command vs.RectangleN() can be given a variable name. This is not correct. This function returns None, so the variable would be equal to None. No matter what, it is necessary to use the vs.LNewObj() after the rectangle function in order to give the created rectangle a variable. I apologize for giving the wrong info, I hope I didn't confuse anyone! When placing a Google map in the file this way, does it place the image in the correct geographic location? Yes, It obtains the lat and long from the Heliodon. If the Heliodon is rotated, the map comes in similarly rotated. Is the Marionette.py file automatically created and updated? It's copied into the user folder when Marionette runs. But, It's not changed in any way. Can you please repeat the context/definition of the python paragraph called "def RunNode(self):" The RunNode function defines the functional behavior of the node. It "maps" input values to variables and performs operations on the variables, then maps the results to output values. How does the scripting language know where a block of code ends? i.e. Java has { }... White space is significant in Python. It uses indentation to specify scope. In your Filter example you left the Else alone. Shouldn't that have been reversed or deleted? Not necessary because the logic in front of the Else() was inverted. Missed a couple minutes because of internet failure - but do all VW commands have a corresponding Marionette or Python function? Many commands in VW have a function call in the API. http://developer.vectorworks.net/index.php/VS:Function_Reference Can i use a smaller/ nearer area in google maps? You can change the “Zoom value” setting in the Marionette definition. However, Google does impose some limits. Will you post the Marionette resource page again? Thanks www.vectorworks.net/marionette (marionette resource page) www.vectorworks.net/sciencefair (info. on science fair competition) After you've repurposed a node (SetName for example), where does it live? i.e. how do you access it for future projects? It's in the file you are working in as an instance of a plugin object. You can put it in a symbol and put the file in your default library user folder to make it available to the tool popup. You're calling the variable string - I would call it name, can you do that? You can call it whatever you like "rectangle" has double quotes the next SetDescription is in single quotes. does it make a difference if you use double or single quotation marks? There are 3 ways to specify strings in Python! ' ', " ", """ """. Just remember that the quotes have to match at the beginning and end of the string value. http://www.tutorialspoint.com/python/python_strings.htm How would we know that h = object and name = string? Is this defined somewhere else? These are defined in the “Params” class (the upper, first indented section) of the Python script of the Marionette node. Where are the best places to learn the basics of Python? Or would doing that be a bit of overkill for the purposes of using Python with Marionette? Not overkill at all! Marionette can use any code that others have written in Python. There are tons of tutorials for free online. Go to www.python.org Naming convention is that functions start with a capital letter for the first word but variables lower case? You can define your own naming conventions, just remember that Python is case-sensitive, so a variable called “Height” is not the same as a variable called “height”. You are calling vs. functions - does that mean that the whole thing is dependent on vector script macros? (also: What is the relationship between Python, VS, and the core of VW?) VectorScript was the first scripting language for Vectorworks. Python was added a few years ago and calls into the core of VW using the same functions. Another way of saying this is that the Vectorworks Python interface uses the same API as the Vectorscript interface. We had hundreds of functions that had been exposed over the years to allow VectorScript to control Vectorworks. When we created the Python system, we made these all available. The good news here is that if you already know Vectorscript, you’re already familiar with a great deal of what you need to be successful in Python. Where do you find the list of definitions, i.e. T=type, PON=pluginobject name, etc? (also: To identify the parameters within Vectorworks, how do you find out that PON means plugin object name, for example?) These are VectorScript criteria. It’s probably a good idea to become familiar with the VectorScript / Python developer page at http://developer.vectorworks.net/index.php/VectorScript . The “function reference” available at that page gives you a listing of all the function calls available in VectorScript/Python interface to Vectorworks (its “API”). There’s also an “appendix” which lists a lot of constant values (in this case criteria values). See also http://developer.vectorworks.net/index.php/VS:Search_Criteria How, in general, do you identify the APIs available out there on the internet? VERY general question, I know! Python is popular among thousands of developers in various industries. There is an incredible amount of free code out there. I would just do a google search, and also go to www.python.org . What is a "namespace"? It is a "chunk" of definitions (functions, types, ect,). It's a way to stop confusion resulting from duplication of names. Here is general overview: https://en.wikipedia.org/wiki/Namespace Is there a way to specify WHICH Heliodon to use, if there is more than one present in a file (for the purposes of shadow studies/renderings)? There are several ways to do this. Name the heliodons, for example, and get a handle to the heliodon of interest based on its name. -------------- We are constantly developing Marionette and there will be many significant upgrades in the next major release of Vectorworks. Some of that will be driven by your input, so please send us your questions and input! AIA Credit info: US AIA Members Can Earn 1 AIA LU. Those who viewed the webinars live can submit their AIA numbers for us to process: Submit for Webinar 2 Submit for Webinar 3 Submit for Webinar 4 Those viewing a recorded webinar can take this test to receive credit: Test for Webinar 1 Test for Webinar 2 Test for Webinar 3 Test for Webinar 4 And we’ll of course provide updated info for Webinar 4. Webinar_IV_Files.vwx Webinar_III_Files.zip Marionette_Webinar_IV.vwx
  2. Hi Alan,The person who created the original definition in this tutorial was a champion scripter before Marionette, so some of the nodes he simply wrote on the fly instead of looking for them in the library. Poly SetClosed is an example of that. I would continue to use the ones that are actually in the library. Sorry for the confusion. It is also not possible to debug a definition INSIDE a wrapper so yes you do have to unwrap the definition before debugging it. I will check with the engineers as to why this is necessary because I would like to debug a definition inside a wrapper as well. Hope that helps!
  3. Thanks for the feedback Neil - I agree that we should look more closely at data flow nodes because they are the category that is most fundamental to visual scripting and probably the most obscure category for non-scripters.
  4. I am not sure why the boolean node is keeping the rectangles when it is in the wrapper, but I added a few nodes to isolate and delete them within the wrapper.
  5. Hello - I checked this file out and the issue seems to come from the offset poly. you have two different operations performed on this single object - planar boolean and extrude. Because of this the definition will react differently within a wrapper. A wrapper changes the hierarchy of operations within a definition - it can't hold off performing operations til the end of a definition. For example, using the delete node within a wrapper can cause a problem - its best to create an output for the object to be deleted and attach the delete node outside of the wrapper. For this definition, if you make a copy of the offset poly and use one for the boolean and one for the extrude you should be fine. Let me know if that works! -Sarah
  6. sbarrett

    Set Fill node

    As Jim said you can use the attributes node - that is the simplest way to do it - but if you want to use the Set Fill node, the input for the back color must be three values [r, g, b]. The easiest way to do this is to use a Point3D node from the points section and give the x- y- and z-coordinate a value between 0 and 65535. This node is a little tricky and should have a better description.
  7. Hello - You can use the "linear extrude" node in the solid section to extrude a 2D object in any direction you want - it does not matter whether it is in layer plane or screen plane
  8. The If node is a little tricky in this way - it does not negate the true or false input, it only filters the information. For this: "I have a test if A>=B then true, Draw circle, else (False) draw square." For it to work, it would have to draw the square or circle AFTER the if node. If you send a circle into the false input and a square into the true input, it still draws them because they are part of the definition prior to the If node. The way you could do this is if you connected the delete node to the output of the if, that way it would delete whichever object you choose. The best way to use the If node is if you have two values that you want to choose from, not two objects. that was you could send one of two radii to a circle depending on the test - the other value still exists in the definition, but it is just not used to create anything. I hope that explains it!
  9. We don't have a dropdown menu for classes yet, but we do for layers. There is a set class node in the attributes category (instead of the classes category) - I think this location is debatable. If you combine it with a class list node and an integer node, you can input the index of the class. Its not ideal but it is a stop gap.
  10. Hello all - if there are specific nodes that people are having trouble using or certain types of definitions people are looking to make, we could use suggestions for the next tutorial. Topics could be, for example: 3D/Solid geometry, referencing and searching documents, an in-depth look at the Data Flow nodes, etc. Feel free to let us know what you want more of!
  11. sbarrett


    Alan, some nodes end up in Layer plane and some end up in Screen plane. If you are trying to create 2D objects I would suggest either the Set PrefID to Ground node that Jim mentioned, or just run your definitions in Top/Plan view. If you want to still see you definition in 3D I would also recommend selecting all the nodes in the definition and making sure they are all in the same Plane Mode.
  12. The string nodes are where you input the different layer names you want to use. If you look at the OIP for the Layer List wrapper, you can see where to change the layer names. The series node creates a list of numbers based on the number of layer names you input. If you want 4 layer names, the series node will create a list of the first 4 index numbers that will call the first for layer names from your list: 0,1,2,3. If you wanted to pull specific names instead, you would skip the series node and just input the index numbers you wanted to call.
  13. Hi Mark - Here is a network for adding multiple layers - to take specific items from a list, use the Get Item node from the Data Flow category.
  14. Here is an update to this file - the output of the nodes was not correct.
  15. Hey Luis - These look great! I am so glad that you enjoy Marionette as much as I do. Here is a suggestion for using lists to streamline your definitions...
  16. Tim - I would start with one of the aspect of the wall - a definition can get complex and overwhelming very quickly - but if you break down the problem into smaller projects you can combine them later. With the wall for example, don't try to build a parametric brick wall, try creating a series of locus points in 3D. Then try distributing rectangles along a line, etc. If you think of a project in much smaller, simpler steps it will be easier to build in Marionette. Also, those individual parts can be used over again in different definitions.
  17. Yes I definitely think it would be possible, although you would go about it differently in Marionette than you would in Grasshopper. In Marionette, I would suggest you create the bricks first and distribute them (Move) to points along a sine wave line at each brick z level. You might need to do a little clever maneuvering to get the tangent vectors for each point (because there isn't a tangent node that I am aware of), but once you do, all you need is to translate those vectors into a rotation and use the rotation node along with the move node. There are several nodes that work similarly to Grasshopper's Dispatch component, and they are in the Data Flow menu. For example, Filter, If, and Unzip are all nodes that parse lists. I hope that helps - If you get stuck, I will be happy to offer suggestions!
  18. Here are a couple wrappers that output sine and cosine waves. I thought the math enthusiasts might find these useful. Sine Wave.vwx
  19. Control geometry is definitely great when creating marionette objects, but if your goal is not necessarily to create an object but a system, the name node works well too. Named geometry can also be tucked away within a wrapper. All you need to do is give the Name Node a name and wrap it. Then double click to edit the script and paste the named geometry inside. That way your geometry isn't visible but still always available. You can edit the geometry any way you like from inside the Name wrapper. To name an object, go to the data tab in the OIP and type in the name at the top.
  20. Here is the node with the proper output - it gives the memory location of the object instead of the handle type, but it works properly if you try to parse it or manipulate it later. The vs.Marionette_DisposeObj() is code I snagged from another node - this entire node is a Frankenstein of other node parts - it is one of the earlier ones I made. It may not be pretty, but it works!
  21. Hi Kevin - my node was missing one line of code. Here is an updated version. Now it should create the right amount of objects.
  22. Hi guys, we are happy to take suggestions on new nodes. We definitely have more in the pipeline. When I started using Marionette I was very well versed in Grasshopper but not necessarily in coding. I have really liked being able to access the code behind the node and I have been experimenting with some of my own nodes. I have attached a file with some of the nodes I have created so far. Granted I am still an amateur at coding but this file does include some array nodes. If you have any suggestions on how to improve these nodes it would be greatly appreciated!
  23. Mark I am also getting a crash with this file - however if I convert the marionette object to a wrapper, it works without crashing.
  24. Hello Kevin and Michael, the best way to move an object is to use the Move Node in the Operations category. for the offset input, you can use a "point2" node, "point3" node, "vector2" node or "vector3" node. all of these are in the Input category. You can also use "Point3D" or "Point2D" from the Points category. For each of these nodes, you can set the x- y- and z- values the DISTANCE you want to move the object in each of the three directions. It works just like the move command in VW. The Rotate node works in a similar way. You can use any of the 3D point or vector nodes as your input, and if you want to rotate an object within the xy plane (as you would a 2D object in plan view) you make the z value of your 3D point node the angle that you want to rotate the object by. Each x- y- and z-value represents the axis around which you will rotate the object. I hope that answers your questions! Sarah
  25. Here is a file with some Platonic Solids as nodes and Marionette objects. The faces of the solids are in the form of 3D polygons.


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