Jump to content
Developer Wiki and Function Reference Links ×

Marionette Monday Webinar Questions


Recommended Posts

  • Replies 67
  • Created
  • Last Reply

Top Posters In This Topic

Take a look at this previous thread for info on how to add custom Marionette nodes so that they can be accessed from the Marionette pull-down menu.

Very helpful tip from Pat Stanford quoted from that thread:

And those nodes MUST be saved as a symbol. That is the part I was missing.

It is probably best to check the "Convert to Plugin Object" box on the create dialog otherwise you will have to manually ungroup the node before you can use it as part of a network.

Your nodes will be saved in a separate sub category than the default nodes. So if you create a file 01. Basic Math with some nodes (as symbols) in it, it will not just add them into the Basic Math sub-category, but will give you two Basic Math sub categories. The first with the info from the User Folder, the second with the data from the Application folder.

The good news is that you don't have to restart VW for it to recognize that new nodes (or files/folders) have been added. They just appear.

Link to comment
  • Vectorworks, Inc Employee

Hello everyone! Thanks to those of you who attended today's Webinar. If you were not able to catch it, it will be available one YouTube soon.

For now, I am attaching the file I used in the webinar - I didn't get a chance to show what all of the definitions can do, so feel free to play around with them.

Link to comment
  • Vectorworks, Inc Employee

Demo File

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.

Link to comment
  • Vectorworks, Inc Employee

A few users asked during the webinars live:

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

Those viewing a recorded webinar can take this test to receive credit:

Test for Webinar 2

Test for Webinar 3

And we’ll of course provide updated info for Webinar 4.

Link to comment
  • 2 weeks later...
  • Vectorworks, Inc Employee

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.

Demo files and video links added to original post.

Edited by JimW
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...