Jump to content
Developer Wiki and Function Reference Links Read more... ×
MRoth

get stuck in some marionette projects

Recommended Posts

Hello everyone

 

I have some marionette projects where I am currently working on.

 

1) I want to build a translator tool for marionette nodes - of course with marionette. This because my English is about as good as that of the Google Translators (I think you’ll notice it) and I would consider not at each node a bit more specific what exactly this node does. So, a Translator would be nice.

 

This network should be able to translate an existing network. I see two possibilities for that.

a) The script is rebuilt with new nodes. The connections between the nodes could be very complicated with this solution.

b) The code in the nodes is changed. I think this version is more realistic, have gladly corrected me.

 

In order to implement b I would have to be able to edit the script in the node. Is that possible and if so how? A set node would suffice, because I can read out the names of the nodes from the content on the drawing.

 

For the translations, I'm still undecided how I best save them. In a database, as texts in the drawing or in string nodes? If it should, be possible to read the script of the nodes, the translations could be stored also in nodes. (But that's probably a little far.) What is the best way to store such a large amount of strings?

 

 

2) On my second (and hopefully a bit easier) project

 

Here, I want to change the transparency of a viewport. This works no longer via the attribute palette (I think in VW18 it still worked) To accomplish this anyway, the transparency of the displayed layer would have to be changed. I found a function in the DevWiki, which probably could do this. (SetVPLrOvrdOpty). But I am not able to implement this function in a node so that VectorWorks doesn't crashes when running the network. Maybe someone could help me here as well.

 


3.) And for the last project. I want to capture the objects from a design layer (not sure if the this is the correct name. In any case, the layer with the planheads) in a PIO and then rotate and move them. The resulting PIO will also be on a design(?) layer. However, moving the viewports (and possibly other objects. I could imagine that groups are too hard to move.) does not work. Is there a good solution to move all 2D-objects? I also tried move-nodes from @DomC but they all fails. (even the Move 2D-Node)

Sadly, this problem has to be solved by a PIO, cause viewports referencing on a design(?) layer are not possible. If this would be possible this project would be useless. This project has the lowes priority for me. It's just a nice-to-have.

 

Thank you for your help.

 

Manuel

 

 

PS: Please excuse my bad English. I try hard.

Share this post


Link to post

Ok, let me try this again.

 

1) Here I found out that vs.SetObjectVariableString() does not work. Or at least it does not work with the indices 1 to 1'000'000. If there is another idea of how code in a node can be changed, I would be very grateful to hear from it.

 

2) Here I can post a node of which I thought would work. But he does not. Does anyone know what I'm doing wrong?

Verlauf.vwx

 

3) For the third project I've found another solution without marionette.

Share this post


Link to post

You are trying to set a viewport's opacity. That's interesting. A VP cannot have direct opacity. You can give the VP a fill colour and put it into a class and set that class to an opacity. I don't think you can give the whole VP an opacity that will pass that opacity on to everything that is contained within.

Share this post


Link to post

I know that it isn't possible to assign opacity to a VP. That's why I try to create a layer override with the desired opacity.

 

grafik.thumb.png.d8e50b76ba0ff80b080dc653590e2f42.png

Deckkraft = opacity

 

The first script in the attached file should create a layer override for the layer EG-Arch.

The second script should create a layer override for all visible or gray layers.

The viewports on the right side shows the result I like to have. But it does not work the way I want.

Share this post


Link to post

Yes, it's a self-scripted node, cause the standard Set Opacity node is not able to set the viewports opacity. Thanks for helping me.

Share this post


Link to post

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

Sign in

Already have an account? Sign in here.

Sign In Now

 

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.

×