Jump to content

SBarrettWalker

Vectorworks, Inc Employee
  • Posts

    335
  • Joined

  • Last visited

Posts posted by SBarrettWalker

  1. On 5/16/2017 at 6:24 PM, Jab_be said:

     

    Sorry for this probably stupid question but... How using this wonderfull script in an other file?

    I tried to "export scrit" and import in an other file but, i've un error each time.

     

     

    Hello @Jab_be,

     

    If you want to save a Marionette script to use in another file, the easiest way is to wrap the network, select the wrapper and go to Modify -> Create Symbol... and make sure that "Convert to Plug-In Object" is checked. Now your network is a Plug-In Object in your document and you can import it into another document just like any other Plug-In Object.

    • Like 2
  2. @Mandolomo  I don't know if changing the text's justification will help much because the network is set up so that the text box is only as big as the text inside. Changing the horizontal alignment will change the position of the entire text box - if you make the text box bigger then the justification will change the way you want it to.

  3. I reworked your network a bit - instead of creating the rectangles and arcs and then moving them based on the position of the text, I used Get Rectangle nodes to get the different control points of the text box and had those points be the starting points of the rectangles and arcs. I wrote a custom node that draws a rectangle from a width and height and center point. I then added the pop up node - basically whatever list you give it, the output is the index value of that list. So if its the first item in the list, the output is 0, the second item, the output is 1, etc. You can then use the Get Item node with a list of values (corresponding to the list in the Popup node) and then feed the Popup node to the Index input of the Get Item node. I set up the network so you can use the popup to choose left, top, right, or bottom for the arrow positions.

     

    If you want to make it a resource, all you have to do is select the Marionette object, go to Modify - Create Symbol... and make sure that Convert to Plug-In Object is checked. Then it will be available in your resource browser just like any other object.

     

    Position_Label_Combined.vwx

    • Like 1
  4. Hello @Mandolomo-

     

    I see that you are using an educational version of Vectorworks but it is v 2016. I would recommend upgrading to 2017, because Marionette is much easier to use - mainly because there is now a search function in the Resource Manager which allows you to search for nodes by name, as well as the nodes are in page units, so you can scale your drawing and the nodes will remain page size.

     

    I would recommend using the Get Rectangle Node in the Objects-Rectangles category to get you a position on your object. Even if you object is not a rectangle, it will give you the bounding box of the object so it will still work

     

    I have attached a doc that has a Popup node that you can edit. Just double click on the node and read the grayed out lines inside for instructions.  Popup.vwx

  5. The way I would do this is to used a Divide Curve node which is in the NURBS folder. This will give you a series of 3D points, then you duplicate your object and move those duplicates to the points. This will give you a path array based on number of divisions of the path, but if you want to do it by distance, you would have to do some math where you figure out the length of the curve/3D poly, then get your number of divisions that way.

  6. There was a little line of code missing to ungroup the 3D polys - I have included an edited version of the node in a new file. I will file a bug for this to get changed in the node library as well. Also, the ungroup nodes are unnecessary in your network - the geometry outputs of nodes are automatically placed in Marionette containers/groups for versioning purposes, but this actually has no effect on how the geometry travels through the network.

    Marionette Proj Playground_edited.vwx

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

     

    • Like 3
  8. On 1/27/2017 at 9:32 AM, sbarrett said:

    the 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!

    @Henrique Lauerdid you try this?

    • Like 1
  9. 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. 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. 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. 20 hours ago, digitalmechanics said:

    also, if you look at the rain fall chart, the numbers overlap & 2 months on the wind rose sheet got an error message.

     

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

  14. 13 minutes ago, J. Wallace said:

    @sbarrettI noticed that the precipitation rates for Nanaimo, BC, Canada were off. Environment Canada has an excellent data based for many stations in Canada. It would be great if we could somehow pick which the station the data is coming from.

    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.

    • Like 1
  15. 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.

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

  17. 2 hours ago, J. Wallace said:

    These are fantastic @sbarrettthank you very much. With the precipitation file, would it be hard to show total annual rainfall along with the monthly?

    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.

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

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

    • Like 1
×
×
  • Create New...