Random parameters in Doors and Window
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2006-08-17
07:35 PM
- last edited on
‎2023-05-24
12:46 PM
by
Rubia Torres

BTW It would be great if Graphisoft create this feature to all library parts, isn't it?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2006-08-17 08:39 PM
If you need a solution now instead of waiting for new setting from HQ, I wonder if saving the parts in question set as you need with new names and substiuting them in the module would solve the problem. ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2006-08-17 09:54 PM
I started to try a gdl solution... and then I came with this piece of code to put in the master script of the door or window:
IF RNDOPEN THEN
openrand=INT(RND(10))
PARAMETERS gs_open_3D=90*NOT(openrand>=4)
PARAMETERS gs_shut_open=1*(openrand>=4)
ENDIF
I created a boolean variable (RNDOPEN) to control the randomness...
I've made some tests with modules and it works!

What do you think?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2006-08-18 08:42 AM
Try Merge and see if it happens then. Save under a different name of course ...
What are your modules? Whole buildings or flats/rooms?
Are you using MOD or PLN?
ArchiCAD since 4.55 ... 1995
HP Omen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2006-08-18 08:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2006-08-18 12:34 PM
Djordje wrote:I'm using modules (MOD) for hotel rooms... They seem to work pretty fine every time I copy or insert another module... Now I can get windows open randomly within the instances of a single module
What are your modules? Whole buildings or flats/rooms?
Are you using MOD or PLN?

F. wrote:Coming from a GDL Master as you are is always a great honor. Thank you!
Well done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2006-08-18 01:37 PM

I say "Well done", because you don't change gs_shut_open and gs_open every time the script runs to a random value, but only in the moment you do changes in the window settings. The random value is effective only in the moment PARAMETERS works and that's only in the moment GLOB_SCRIPT_TYPE=5 (and some other minor circumstances), means you are in the settings dialog or dragging a hotspot. This bewares of flickering of the openings in different views or animations.
One could use instead of RND a mixture of "random" parameters of the object as GUID, Position, Elevation, Rotation of the wall. But I think your way is pretty good.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2006-08-18 04:31 PM
F. wrote:I didn't know that
The random value is effective only in the moment PARAMETERS works and that's only in the moment GLOB_SCRIPT_TYPE=5 (and some other minor circumstances), means you are in the settings dialog or dragging a hotspot. This bewares of flickering of the openings in different views or animations.


BTW... I'm developing the idea by controling the probability of a "Closed window" in the randomness. So I created an integer variable named RNDPROB for it. Here it goes:
Parameters Script:
VALUES "RNDPROB" RANGE [0,10]
Master Script:
IF RNDOPEN THEN
OPENRAND=INT(RND(10))
PARAMETERS gs_open_3D=90*NOT(OPENRAND>=RNDPROB)
PARAMETERS gs_shut_open=1*(OPENRAND>=RNDPROB)
ENDIF
Sorry for the unformated code
