Jump to content
Developer Wiki and Function Reference Links ×

dynamic script


Recommended Posts

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 by someonenamedlink
Link to comment
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

Link to comment

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

Link to comment

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) smile.gif

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...) grin.gif

Edited by vsd
Link to comment

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?"

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