# node example for filling an area with symbols

## Recommended Posts

Normally, an int will be automatically converted to a real value if necessary. So this should not be your problem. I don't see your script but I can imagine the problem is to repeat different angle values for the number of your symbols. You can make this by repeating one of the inputs of your angle generator (random number as example)

A good start is to just check it step by step. As example connect an int to the angle and look what happens. Then you connect a real value and look again what happens. You will see, there is no difference between the input. But If you have a hundred symbols, and just input one value to the angle, all symbols will be rotated to the same angle. Use the debug mode (bug method) to see, if all wires have the same number of values.

Another Issue could be, the Rotate-Node detects your symbol as a 2D Object. So you cant make a 3D Rotation. Maybe you have 2D/3D Symbols? Just post a part of your example, because it's hard to tell all possible issues on stock.

Edited by DomC
• 1

##### Link to post

I got this script there I've done by working on your file. ( see attachment). ( hope you don't mind, let me know)

I succeeded on implementing the rotations. z axis for the symbol angle and a 3D rotate too.

I got some unstabilities but it doesn't bother me as it's just a work in progress. I plan to do some kind of ivy leaves.

I noticed your script is not really efficient for near vertical surfaces, cos the symbols are put using a x,y pattern, I think I got a way to avoid it. ( by turning an the control surface to be near horizontal before executing the script, then get it back where it was.)... not so neat but efficient I think.

I plan to work on a way to execute this script in a volume ( a 3D grid to replace the 2 grid you used). I thought of building a 3D grid of 3Dloci according to the control object dimensions, and put a symbol on each 3Dloci. but I can't find a good way to see if a loci is inside or outside a 3D volume.... I thought of trying a boolean on each loci but it seems senseless.

Got to go now to a more money productive work. See ya.

Thanks for your help.

Untitled 26 copie.vwx

Edited by mattao

##### Link to post

Hello,

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.

In fact, i wonder in general how to transform a marionette in script...

Thanks ;-)

##### Link to post

Export Script does not export the file as a true script that can be run in a different file. Think of it more like a script to regenerate the overall file.

There is currently not a way to convert a Marionette to a script without a lot of work.

##### Link to post
1 hour ago, Jab_be said:

Hello,

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.

In fact, i wonder in general how to transform a marionette in script...

Thanks ;-)

It's not easy... but not so hard

You've got to copy the marionette object to use it AND the folder it's linked to. The marionette object call for a folder ( like the Baume folder in some of the DomC provided files). Copy the folder first... then the marionette object, otherwise it call an inexistent folder and crash.

On my files I succeed in linking the marionette object to other folders containing other symbols AND modifying the marionette object "control geometry" to be as needed.

I"ve succesfully obtain "foliage like" effects by doing so

Please pardon my english ... i am not very fluent in these language

Edited by mattao

##### Link to post

Thank you, now i know it's not possible to convert marionette in a script.  Right-click on a marionette and i see "export as a script"..

I don't know if it's about this you explain, but there is a cool plugin for foliage https://andreafacchinello.wordpress.com/2015/12/11/foliagev2/

Sorry for my english too, my french is better ;-)

##### Link to post
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.

• 2

##### Link to post

Im trying to modify the node, so the marionette is also able to scale the symbols. The new node works fine as long as i don't use it with symbols that contain image-props. When i use them the texture is not scaled. As a workaround i can duplicate the marionette object. As soon as i delete this duplicate all the textures are scaled correctly in the original marionette object. It's like they redraw when i delete the duplicate. I also had this issue with image props within scaled symbols in a converted file from vw2018. I suspect that something with the display of image probs in scaled symbols is not yet correct.

Here is a sample file of the marionette object:

I also tried to implement the workaround into the marionette-node. When i use this script on a symbol with an image-prop inside it reproduces the issue.

```hSym = vs.GetObject('test')
vs.SetObjectVariableInt(hSym, 101, 2)
vs.SetObjectVariableReal(hSym, 102, 10)```

When you add these two lines. It works correctly.

```hSym = vs.GetObject('test')
vs.SetObjectVariableInt(hSym, 101, 2)
vs.SetObjectVariableReal(hSym, 102, 10)
hDel=vs.HDuplicate(hSym,0,0)
vs.DelObject(hDel)```

Unfortunately these two lines don't solve the problem inside the marionette-object.

Any help is very welcome.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

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.

×

• KBASE