Measure distance between two points - command
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2015-03-05 03:12 PM
‎2015-03-05
03:12 PM
Quick simple question.
Is there a command allowing to quickly measure distance between two points defined by X and Y?
.... something like this "DIST":
DIST 10, 20, 30, 50 , distance
PRINT distance != 36,1
If there no such command than is there a simpler method than this? :
distance = sqr( (30-10)*(30-10) + (50-20)*(50-20) )
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2015-03-05 04:11 PM
‎2015-03-05
04:11 PM
philips wrote:Hello.
Hi,
Quick simple question.
Is there a command allowing to quickly measure distance between two points defined by X and Y?
.... something like this "DIST":
DIST 10, 20, 30, 50 , distance
PRINT distance != 36,1
No.

Or none that I'm aware of.
Finding the hypotenuse is the simple way of knowing the distance between two points.
philips wrote:You could only simplify with:
If there no such command than is there a simpler method than this? :
distance = sqr( (30-10)*(30-10) + (50-20)*(50-20) )
distance = sqr( (30-10)^2 + (50-20)^2 )or
distance = sqr( (30-10)**2 + (50-20)**2 )but that's about it.
Best regards.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2015-03-19 10:55 AM
‎2015-03-19
10:55 AM
It would be really nice to have such a command, especially when it comes to measuring distance between two points defined in 3D by X, Y, Z.
Measuring is very useful when trying to do such a thing (point attracted cones):
Measuring is very useful when trying to do such a thing (point attracted cones):
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2015-03-20 03:14 PM
‎2015-03-20
03:14 PM
Hi,
you can always use a subroutine with some variables to store input and output or a macro object with seven parameters, six input and a returned parameter for the result.
you can always use a subroutine with some variables to store input and output or a macro object with seven parameters, six input and a returned parameter for the result.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2015-03-20 05:05 PM
‎2015-03-20
05:05 PM
Basically, for measuring distance in 3D, its not that difficult as it is:
but still it would be nice to make it more simple.
Next question:
Is it possible to request position of any other object selected by its unique ID?
What I'm thinking of is to treat a secondary object outside the GDL object to work as a attractor influencing parameters of this GDL Object...
For the above example I used a moveable hotspot inside the GDL Object as the attractor. This is why I can make many options of it a few seconds:
distance = sqr ( (x2-x1)^2 + (y2-y1)^2 + (z2 - z1)^2 )
but still it would be nice to make it more simple.
Next question:
Is it possible to request position of any other object selected by its unique ID?
What I'm thinking of is to treat a secondary object outside the GDL object to work as a attractor influencing parameters of this GDL Object...
For the above example I used a moveable hotspot inside the GDL Object as the attractor. This is why I can make many options of it a few seconds:

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2015-03-20 05:25 PM
‎2015-03-20
05:25 PM
GDL Objects cannot be aware of each other directly, there is no such functionality as far as I know.
I don't know if the following could be done but one object could write the information needed by the other object into a file, and the other object could read it.
After the first object wrote the data, you would probably have to regenerate the other object to read the data from the file.
But I don't know if this would work as I have not tried it myself, it is just an idea.
I don't know if the following could be done but one object could write the information needed by the other object into a file, and the other object could read it.
After the first object wrote the data, you would probably have to regenerate the other object to read the data from the file.
But I don't know if this would work as I have not tried it myself, it is just an idea.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28