Jump to content
Developer Wiki and Function Reference Links ×

Custom Dialog Box In Marionette Menu Script


Recommended Posts

 

    

Hi

 

Is it possible to have a Marionette script that pops-up a custom dialog box so I can get input for running a script. I can't really use the OIP as I need to select a the objects, get input, then assign data to the objects. 

 

I have attached a few screen shots, The no color or the starting point, the color is the ending point and the last one is the different patterns used to connect everything togehter.

 

The main object is a symbol and the colors are rectangles (I wish a symbol created on none class would inherit that attributes of the class it is on). The arrows attachement are the different way of connecting things together.

 

So I would like to be able to draw the main screen, highlight a section and run a marionette script via a menu command that will add color, arrows and update records. I think I can manage all of those elements, however to work I need to input 4-5 bit of data. For example, the Processor number, port number, starting ID number and the arrow connecting pattern (also a few other details that attach to a record used for reporting).

 

How much of this can be done with a native Marionette script vs a custom node. I don't see an easy way for the patterns in native Marionette and suspect this portion will need to be a script. 

 

Thanks!

 

Martin

Screen Shot 2018-02-09 at 3.35.05 PM.png

Screen Shot 2018-02-09 at 3.35.31 PM.png

Screen Shot 2018-02-09 at 3.34.21 PM.png

Link to comment
  • Marionette Maven

Hi Martin,

 

There are a few different ways we could approach this. I think the most important thing to do is start small and add functionality as we go.

 

The first thing I think we will have trouble with is that the objects you want to manipulate are symbols. Are you looking to modify the symbol definition, or will these objects be inserted as groups so that they can be customized? (It would be easier if they are inserted as groups)

 

Would it be okay initially if we were to draw the arrows and have those define the layout and colors? (We can always look into adding the auto-arrow-pattern option later)

 

Will these layouts always be the same, or will the number of rectangles change at any point?

 

We do have nodes that will prompt the user for input, and although I've never tested, it's likely that we could create a custom dialog as well once we got things moving along.

 

In any case, it's very possible that we will need to tweak some nodes and possibly create some new ones. I'd be happy to work on this with you.

 

Marissa

Link to comment

THANKS!

 

Maybe I should rethink how I approach the problem. 

 

I'm thinking three sets of scripts.

  • The first draws the base screen and assigns the ID number.
  • The second creates the color (and lines) and updates the symbol record with the correct data. These would be rectangles the same size as the symbol.
  • The third would be the lines and circuit data for power.

I am attaching the script to create the screen, it works except for assigning a name to the rectangle. The rectangle act as a bonding box and I use it for calculating the Sq/m area as well as the resolution of the screen. I also need to get the symbols on the correct layer and class. I am assuming this is easy?

 

I am still working on the color, I have something that sorta of works, I just need to work out a few details. I need to create a list of colors (actually two lists, depending on product), each list would either 12 or 8 pairs of colors. What is the best way to create a list of colors that I can access from the OIP?

 

I agree, baby steps is the best approach.

 

 

Thanks

 

VER_LED_Install_-_Marionette_Scripts.vwx

Link to comment

I have a script that create the base panels, and a second that create the color. I have added to the color and order that incorporates the different patterns that I would need.

 

Give all this, how do I draw a line from center point to center given a list of X,Y values?

 

II'm thinking a custom node that takes the list and loops through to creates the line.

 

Does that make sense.

 

Martin

Link to comment
  • Vectorworks, Inc Employee

Hello Martin,

 

Here is a script that places a symbol in an array based on a given number of columns and rows, and then sorts them and draws a line through their center points. There is one custom node, Reverse Lists Chunks, that allows you to reverse the order of lists within a larger list. I used this to create the line that swerves back and forth.

 

ArrayingSymbols.vwx

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