Mouse Input
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-01-26
08:52 AM
- last edited on
2023-05-24
10:23 AM
by
Rubia Torres
I have made numerous GDL scripts but they have always been quite simple. Some have involved quite complex geometry and numerous parameters, but they have been simple in the sense that they have been standalone models which I just place into my design as I need them, like a car, or a tree, or a door handle.
I am looking to make a much more complex model. I am designing a building which has many catwalks and stairways, and I would like to create a parametric model of a hand rail which I can use throughout the design. Furthermore, if there is a design change in the detail of the hand rail, I would like it to update automatically throughout my model.
Is there a way that I can click on a series of points in my design with my mouse, and have these points become data points passed to my model, so that a post supporting the hand rail is automatically generated at that point, and the hand rail itself is inserted, spanning from the previous point to the new one?
I would love it if I could do this, because then I would just have to change the macro for the post or the rail to change everything.
Does this make sense? Does anyone know how to do something like this? It seems difficult because it looks like my object would somehow have to interact with the ArchiCard user interface to capture the mouse positions.
If it is possible, I would like to program the model in as open ended a way as possible so that I could reuse the core idea to make a fence generating script, or even a wall generating script simply by clicking on a number of points.
Thanks!!
Philipp

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-01-26 10:16 AM
AFIK plain GDL do not allow for a direct interaction with the mouse or other interface elements, but you can take advantage of existing Add-ons.
Using the Accessories is my best bet for this.
Some years ago I made a "Slab border" object (see it HERE) that works very well in association with a standard Slab. The Slab itself can be in a hidden layer. When I need to change the path, I simply edit the Slab perimeter.
--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-01-26 11:18 AM
I've known about your "Slab border" object a couple of years ago and I found it very interesting...
But I actually didn't have much time to try it...
Could you please explain:
Can we create an open path?...
Can I control the starting point of the path?...
In which form the path coordinates are given... Is it an array?...
Thank you in advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-01-26 12:50 PM
You can specify a starting node end an end node, then the border is drawn between these two points, following the Slab perimeter.
The nodes coordinates are found in a parameter array, created in the interface of the object and filled automatically by the Accessory Add-on.
The numbering of the Slab nodes is also managed internally by the Add-on and the user has no control on it, so things can get messed-up, when the Slab perimeter is edited adding/deleting nodes...

--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-01-26 04:01 PM
rocorona wrote:Great!
Yes to all.

Maybe I'll use it in my next object...
Just one more question Roberto...
How does it manage a curved path/edge?...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-01-26 04:35 PM
I've to say that I'm not looking at the object and, since it is an old one, I hope I'm recalling all these info correctly

--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-01-26 05:58 PM
It sounds like the slab idea is a good starting point, except that you mention that the user does not have control over the number of nodes in the path. This is something that I need explicitly. Given a catwalk area, I would like just to click in the positions that I need to place the railing. Clearly, different parts of the building would need railings with a differing number of supports, so it really would be best for the number to be open ended.
Instead of using a slab as a parameter would it be possible just to use a 2D polygonal line as an input, and then examine the line in GDL to determine the number of points it contains?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-01-26 06:01 PM
I am very experienced programmer in a number of languages, so if I just had access to some sort of tutorial explaining the process I would be okay. Does anyone know of such a thing?
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-01-26 06:05 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-01-26 06:11 PM
Check the first section of this forum: there is the DEVELOPER FORUM, focussed on programming custom Add-ons
--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________