Jump to content


Vectorworks, Inc Employee
  • Content Count

  • Joined

  • Last visited

Everything posted by sbarrett

  1. sbarrett

    Dashboard Scripts for data in WSs

    hello - if you are asking for (somewhat) interactive graphs, you can take a look at my weather analysis tools - they download data from the internet and create graphics. You will probably have to do a lot of adapting though.
  2. sbarrett

    Edit an existing symbol

    Is there a way to insert an object into an existing symbol? I can't find any relevant calls in the "Object-Symbols" section of the developer page. Any help would be greatly appreciated. Thanks, Sarah
  3. sbarrett

    Script needed for speeding up tedious workflow!

    Hello - This was an interesting question for me because I have not done much scripting with symbols, so I just made it for you. I am interested to know how you would use this; it seems like you would want more control, such as instead of creating extrudes, creating spaces, or perhaps extruding different heights based off of other data. There is a drop down menu in the wrapper that allows you to select different types of 2D objects to extrude. One of the symbols has a polyline, so I would run it once for polygons, and once for polylines. WorkflowTest_28Feb17-SB3.vwx
  4. sbarrett

    Edit an existing symbol

    Thanks Pat! That is exactly what I needed!
  5. Attached is a file that can be used as an exercise to practice Marionette. Going though the saved views, you can follow step by step instructions to build geometry. There are also files with the solutions to the exercises. Tutorial_01_Exercises.vwx Tutorial_01_Solutions_1-5.vwx Tutorial_01_Solutions_6-7.vwx Tutorial_01_Solutions_8-9.vwx
  6. sbarrett

    Weather Analysis Tools

    @Henrique Lauerdid you try this?
  7. sbarrett

    Platonic Solids

    Version 1.0.0


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

    Sine Wave

    Version 1.0.0


    Here are a couple wrappers that output sine and cosine waves. I thought the math enthusiasts might find these useful.
  9. sbarrett

    IF Node performing a Mix2 at the same time?

    Here is a version of the If node that I use - if the length of the true values, false values, and test values are all the same, it works the same as the original If node. if the lengths of the values are not the same, it takes the first value of the test values and uses that to determine which list of values (true or false) will be sent through the node. For example: True values: [1,2,3,4,5] False values: [A,B,C] Test values: False Then the result would be [A,B,C] Ifv2.vwx
  10. sbarrett

    Weather Analysis Tools

    That is definitely something that can be added to the script - I mentioned in an earlier post that the script takes data from the three closest weather stations to the location entered into the OIP. If I enter a city, like Baltimore, MD, the geocoded function in the script will extrapolate that city's "center," which may not be the geographic center of the city but a particular landmark. As there may be several weather stations in a city, the more specific you can make the address (as in 1234 Main St., Baltimore, MD) the more accurate the weather station choices will be. I will add printing out a list of weather stations to my version 2.0 list.
  11. sbarrett

    output drawing order

    When I have several objects that are created by a network and can't be ordered the way I want them initially, I will put them through an ordered list at the end, then through a group node, then an ungroup node. This will put them in the correct order as well as a single Marionette group.
  12. sbarrett

    Weather Analysis Tools

    hi @digitalmechanics - The errors for the wind rose are timeout errors from accessing the internet - this can happen when the internet connection is a little slow, or if you try changing the Marionette object several times very quickly. Just try running it with those parameters again - it should work. If you get the error again, check your internet connection and try again. As for the Precipitation chart, I see your problem - for a place like Phoenix this problem makes sense because it gets very little rainfall. I will have to make an edit to place the average value to the right or left of the bars of the graph.
  13. 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
  14. sbarrett

    Weather Analysis Tools

    @jpoqthe first time you use the tool it can take up to a couple minutes to update - this is because it has several things it has to download first that it will never have to download again. There will likely be dialog boxes that pop up asking you to install a Python library, press OK when these pop up. If you internet connection is spotty, the definition can time out. I would suggest that before you change anything on the object, that you right-click and select convert to wrapper node. Then you can change all of the parameters that you like and then run the definition after you have done this - I would recommend using an American address first time you run it (because it is an American website) and that you make the time period as small as possible. After you have made all of these changes, run the wrapper node. I hope that helps!
  15. sbarrett

    Weather Analysis Tools

    There might be a way to make it more accurate - the network takes data from the THREE closest weather stations to the address you give. Some smaller weather stations don't have great data, so I figured the best way to mitigate that would be to average. There is a way to change this though - if you double-click on the Marionette object, you will see the script inside. Near the beginning of the network, there is an olive green node called "Get Nearby Stations." If you select that node, you will see there is a text box in the OIP that says "3." If you change that 3 to 1 it will only give you the closest station. I find the best weather data comes from airport weather stations, so give an address close to the airport to make sure that weather station is used.
  16. sbarrett

    Weather Analysis Tools

    That could be an interesting exercise - perhaps give a choice between different websites, and then be able to compare and contrast. This would be a hefty task though because I would have to create a different script for downloading the data from each website, but still organize the data so it would be universal to the rest of the marionette network.
  17. sbarrett

    Weather Analysis Tools

    Ah - that is probably due to the data - the data for the charts all comes from the same site - I wanted to do that so the tools could work together, and once you download the data for one chart, it is available for all the other charts. For some reason, the data for precipitation was sometimes sparse for each weather station. I tried several different websites and chose the one I did because it had the easiest interface to download data and had the best data across the five tools. It sounds like I might have to use a different website for precipitation...
  18. sbarrett

    Weather Analysis Tools

    Not necessarily - it was something I was considering. The reason I chose monthly rainfall is that to get a good graph of annual rainfall you need to download a lot of years of data - all of these tools use the same data files, and the rainfall data is hourly. The current precipitation chart downloads the hourly data and averages it by month. If I did total annual rainfall I would make it a separate chart, because combining the two data types (average and total) would change the range and layout of the graph.
  19. sbarrett

    Weather Analysis Tools

    Hello @NikF I just tried inputting "Vienna" into the Temperature Chart and it seems to work. The address locator is similar to Google maps - it takes a lot of different input formats.
  20. sbarrett

    Attribute Error

    Hi Stephan - I am having trouble downloading your file, but from how you describe what is happening, I think this is a bug. There is a bug that I am aware of when you run a wrapped network for the first time after you have duplicated it by duplicating a layer, and usually, this only happens once for each wrapper in a network. This sounds like what you are talking about, but there may be something else involved too - if you can, please file a bug with Vectorworks. btw, this sounds like an awesome script!
  21. sbarrett

    IF node with 3 choices in stead of boolean

    Oachl Kini's answer works great, but for future reference (and if the one or more of the different outputs is in list format) here is how you can do it with the If node. 3ChoiceIfStatement.vwx
  22. sbarrett

    Weather Analysis Tools

    Hello All! Here are the rest of the Weather Analysis Tools I have been working on. These have the same caveats as the Wind Rose - all of them access the internet every time the network is run. These are also a lot newer than the Wind Rose, so there may still be some kinks - I would call these beta versions. Please let me know if you have any issues! WeatherAnalysis-Precipitation-161221.vwx WeatherAnalysis-Psychrometrics-161221.vwx WeatherAnalysis-SolarPath-161221.vwx WeatherAnalysis-Temperature-170125.vwx
  23. sbarrett

    Marionette help with Symbol that can be modified

    Well, with Marionette, you don't need to create symbols and them try to array them - the objects get created and arrayed at the same time. The most efficient way to do this is first to build a Marionette definition that creates the symbol you are trying to build that has inputs for location and (at least for this example) sphere height. Then instead of giving the marionette definition just one point and just one height, give it a LIST of heights and a LIST of location. The script will build each individual object and array them simultaneously. (If you did this by hand it would be much more efficient to make the symbol first and then array it, but not with Marionette.) The list of points you can make by using the Range, Series, or Sequence nodes - they each create series of numbers in a slightly different way. Then, if you have a worksheet or a spreadsheet or a text file that has the list of heights, you can use Marionette to import those numbers directly from the external file to create your input list of heights.
  24. Hello, Here is a script that converts a NURBS surface to a wall with components that can be exported to IFC. The wall is an Auto Hybrid object made up of 3D Solids that match the thicknesses and attributes of the components of a referenced wall style. CWS_1212_IFC.vwx A couple caveats: Make sure that wall style names do not have a single or double quotation symbol in the name - it will get misinterpreted by the String Node. Also, if your base surface is an Interpolated Surface, use the tool in the 3D Power Pack - Rebuild NURBS... - to convert it to a standard NURBS surface.
  25. sbarrett

    Component Wall from NURBS Surface

    Cool! - this should in theory work with roof and slab styles as well


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.