Dieter @ DWorks Posted February 15, 2007 Share Posted February 15, 2007 is it possible to make a script that when a certain parameter is chosen, other parameters are shown/not shown??? it should be like the windows. when you choose frontview, the thicknes of the walls disappears. can it be done to make such a dynamic pio? Quote Link to comment
Petri Posted February 16, 2007 Share Posted February 16, 2007 Yes. Parameters can be disabled and enabled with events. Quote Link to comment
Dieter @ DWorks Posted February 16, 2007 Author Share Posted February 16, 2007 (edited) k, so they can be disabled. but i want to create parameters if some options are chosen or it does it automaticly when it must be done. like a stair for instance. you can give the heigth and then my script calculates the amount of 'elevations' (don't know the exact word) needed for it, then you can say what kind of piece the first part must be and then the second with each an amount of elevations. so when there are some elevations left, then another part must be created automaticly, so the script must make parameters. is this posible? i also have some other questions about dynamic scripts: 1) can you add some sort of button to say with class each element of the pio must be? like in the window pio? or can this be done in another way? maybe with another script that you let choose a class for a part and then set it in the pio? 2) can you adjust how the parameters in the info pallet are shown, like add a line for dividing it into parts, or let them jump in? so that it is clearer what each parameter stands for and so that you can see the different kind of groups the parameters are divided in? 3) how does these events work? Edited February 16, 2007 by someonenamedlink Quote Link to comment
islandmon Posted February 17, 2007 Share Posted February 17, 2007 you can give the heigth and then my script calculates the amount of 'elevations' (don't know the exact word) Rise = elevation, Run = treads AND/OR/NAND are Boolean and require IF > THEN procedures: If "FlrHeight ='305cm ', and "StairRise= ' 19cm', and "StairTread" = '28cm' then "StairRun" = "FlrHeight/StairRise *StairTread Quote Link to comment
Dieter @ DWorks Posted February 19, 2007 Author Share Posted February 19, 2007 No! that's not what i mean! I know that parameters can be enabled, disabled, hidden, shown, made invisible! And the events etc are used when the object is created the first time! I know how to make those dialogs! What I want to is add parameters (presented by the script), buttons, lines, spaces, tabs etc to the info pallet of the pio! something like the button on the info pallet of a window that let you decide how each piece looks! because you can't go back to the dialog that's used to create the object! unless you use many scripts to make the pio, and that's not what i want! i hope you'll understand me now. i really need to know Quote Link to comment
Petri Posted February 19, 2007 Share Posted February 19, 2007 What you want is a dialog. If you know how to make them, just go ahead. Quote Link to comment
vsd Posted February 19, 2007 Share Posted February 19, 2007 (edited) It is unfortunately as stated. If you wish to create buttons and company on a PIO palette, you have to go for Event Enabled Object (Capitalized On Purpose) There is an old workaround to launch dialogs from the PIO oip without having to set up object events: use a checkbox button which you disable immediately after the dialog is launched. I think this could be an acceptable solution. Another old trick: to create a separating line use underscores or similar chars. Just pay attention between Mac and PC. They won't display it equally. There is NO WAY to load a class list on a PIO pop-up: you cannot launch the PIO and have it writing it's own parms after loading. That's why. Dialogs set up differently, so you have "the time" to analyze the document. PIOs live in an enclosed world. They don't even know user defined origins (another nice article on vcor). Here the old trick is to have a <active class> possibility. Then you could load the usual, hated Style-1, Style-2 etc. That's why you find them all the times. Please mind that with events it is not meant the first creation of a PIO, which instantiate the PIO record on drawing. No. And also not the events created by a dialog (which is still a very protected environment). It is quite different. Read that article and you'll understand. You can go back to that dialog that creates the first object: just select a PIO icon. On the menu bar up you'll always find a little icon with two points, representing a list. That are the document preferences for that PIO, the same that you saw the first time. If you change them, every object placed later will reflect those changes. But I'm sure you know that. The normal PIO interface does not allow anything more than enabling, hiding or similar. No buttons. vsd (Petri, do not mistreat him...) Edited February 19, 2007 by vsd Quote Link to comment
Dieter @ DWorks Posted February 19, 2007 Author Share Posted February 19, 2007 thx for the info, i also read the article and i know now whats possible with pio's. Quote Link to comment
Dieter @ DWorks Posted February 20, 2007 Author Share Posted February 20, 2007 I have still a question that maybe be related to this, if you make a menu command, can you say in the script when it must be greyed out and when it can be used? like you'll have to first select something to use it? Quote Link to comment
Petri Posted February 20, 2007 Share Posted February 20, 2007 Yes. Is it in "properties"? Selected, selection includes 2D or 3D, multiple selection - require or ignore. I can't see how this would relate to Object Info of Plug-Ins Objects, though. Quote Link to comment
Dieter @ DWorks Posted February 20, 2007 Author Share Posted February 20, 2007 yeah, it is possible (i know) but what i mean is can you specify it further, like it must be a circle? Quote Link to comment
Petri Posted February 20, 2007 Share Posted February 20, 2007 No. That has to be dealt with in the script with type hanling and user alerts. While in trivial cases one might be able to define that for a (mandated) single selection, there are over 20 basic object types. Even if there would be a series of dialogs to cover these, someone would eventually want even more: "Yeah, I know, but why can't you specify that the selection must contain at least 5 arcs plus a polygon, a text block saying "Call me Ishmael" and the Pogo Stick PIO I have created - unless the radius of any of the arcs is less than 2000mm in which case the PIO must be the Bicycle?" Quote Link to comment
ccroft Posted February 21, 2007 Share Posted February 21, 2007 Hmm....pogostick PIO... Petri, would it be possible write this such that if boolean param 'Jump' is true a param 'How High' would be enabled? :-) Charles Quote Link to comment
Petri Posted February 21, 2007 Share Posted February 21, 2007 Of course, Charles. That could even be a "widget" that launches a dialog for defining other parameter. A Pogo Stick definitely needs to be Event Enabled! Quote Link to comment
Recommended Posts
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.