Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SAC_Finding the X location of the lowest point in list

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
Oleg.Konovalov.SIT
508 Views, 8 Replies

SAC_Finding the X location of the lowest point in list

Oleg.Konovalov.SIT
Enthusiast
Enthusiast

Dear colleagues!

 

I have a following challenge:

I have six points (ap7,ap8,ap9,ap10,ap11,ap12). In my subassembly these six points can have different locations with anyone of them becoming the lowest. Using math.min formula I successfully find the lowest of them in my P25 point. 

Now, the question is, how can I find the X of this lowest point? I want my P25 to be in X and Y coordinates of the lowest point.

I'm pretty sure I could use Decision with multipple checks using OR, but that would cause me to make 6 decisions with 5 OR condition checks, which makes me sad 😞

I was wandering if there is some magic formula something like "find the X of the lowest point in list".

 

Will appreciate and advice.

 

With kind regards,

Oleg

 

 

2022-06-15_17-58-58.png2022-06-15_17-58-24.png

0 Likes

SAC_Finding the X location of the lowest point in list

Dear colleagues!

 

I have a following challenge:

I have six points (ap7,ap8,ap9,ap10,ap11,ap12). In my subassembly these six points can have different locations with anyone of them becoming the lowest. Using math.min formula I successfully find the lowest of them in my P25 point. 

Now, the question is, how can I find the X of this lowest point? I want my P25 to be in X and Y coordinates of the lowest point.

I'm pretty sure I could use Decision with multipple checks using OR, but that would cause me to make 6 decisions with 5 OR condition checks, which makes me sad 😞

I was wandering if there is some magic formula something like "find the X of the lowest point in list".

 

Will appreciate and advice.

 

With kind regards,

Oleg

 

 

2022-06-15_17-58-58.png2022-06-15_17-58-24.png

8 REPLIES 8
Message 2 of 9

KMercier_C3D
Advisor
Advisor
Accepted solution

There may be a different way to do it but I was able to get it to work by using two Auxiliary Points. 

My first auxiliary point used your math.min formula to find the y coordinate.

KMercier_C3D_0-1655296385734.png

Then my second auxiliary point referenced the first auxiliary point and compared each of the points y values to the test auxiliary point to find the correct x value. 

KMercier_C3D_1-1655296433884.png

KMercier_C3D_2-1655296440542.png

KMercier_C3D_3-1655296464104.png

 

 

 

 



Kati Mercier, P.E. | LinkedIn | AutoCAD Civil 3D Certified Professional
Pronouns: She/Her
Co-author of "Mastering AutoCAD Civil 3D 2013"
AU2019 Speaker::: CES321590: Analyze and Revise Existing Subassembly Composer PKT Files for AutoCAD Civil 3D
AU2017 Speaker::: CI125544: Analyze and Devise in Subassembly Composer
AU2012 Speaker::: CI3001: Reverse Engineering with Subassembly Composer for AutoCAD Civil 3D
AU2011 Speaker::: CI4252: Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

There may be a different way to do it but I was able to get it to work by using two Auxiliary Points. 

My first auxiliary point used your math.min formula to find the y coordinate.

KMercier_C3D_0-1655296385734.png

Then my second auxiliary point referenced the first auxiliary point and compared each of the points y values to the test auxiliary point to find the correct x value. 

KMercier_C3D_1-1655296433884.png

KMercier_C3D_2-1655296440542.png

KMercier_C3D_3-1655296464104.png

 

 

 

 



Kati Mercier, P.E. | LinkedIn | AutoCAD Civil 3D Certified Professional
Pronouns: She/Her
Co-author of "Mastering AutoCAD Civil 3D 2013"
AU2019 Speaker::: CES321590: Analyze and Revise Existing Subassembly Composer PKT Files for AutoCAD Civil 3D
AU2017 Speaker::: CI125544: Analyze and Devise in Subassembly Composer
AU2012 Speaker::: CI3001: Reverse Engineering with Subassembly Composer for AutoCAD Civil 3D
AU2011 Speaker::: CI4252: Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

Message 3 of 9

ecfernandez
Advisor
Advisor
Accepted solution

Hi @Oleg.Konovalov.SIT, I hope you're doing fine. The only thing that occurred to me so far is this:

 

1. Create a variable to find the Ymin, as you did it but within a formula (my example)

ecfernandez_0-1655296142710.png

2. Create another formula to compare the Y coordinate of your known points with the result of your previous formula. In that way, when the Y value coincides, you'll have found out which point was the one with the lowest elevation, and therefore you'll be able to get its X value. (my example)

ecfernandez_1-1655296254194.png

3. Create your new point (P25 in your case) and assign the two formula values to the X and Y coordinates. (my example)

ecfernandez_2-1655296313455.png

 

Finally, you will have the point where you need it to be. As you can see in the following image, they are overlapped.

ecfernandez_3-1655296357265.png

I hope this helps. Best regards!

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn

Hi @Oleg.Konovalov.SIT, I hope you're doing fine. The only thing that occurred to me so far is this:

 

1. Create a variable to find the Ymin, as you did it but within a formula (my example)

ecfernandez_0-1655296142710.png

2. Create another formula to compare the Y coordinate of your known points with the result of your previous formula. In that way, when the Y value coincides, you'll have found out which point was the one with the lowest elevation, and therefore you'll be able to get its X value. (my example)

ecfernandez_1-1655296254194.png

3. Create your new point (P25 in your case) and assign the two formula values to the X and Y coordinates. (my example)

ecfernandez_2-1655296313455.png

 

Finally, you will have the point where you need it to be. As you can see in the following image, they are overlapped.

ecfernandez_3-1655296357265.png

I hope this helps. Best regards!

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn
Message 4 of 9

fcernst
Mentor
Mentor

You should mark this as Solved with Katie’s solution. She quickly finds the x value with one line of code for the X value without lining up multiple Decision graphics like you were worried about..



Fred Ernst, PE
C3D 2025
Ernst Engineering
www.ernstengineering.com

You should mark this as Solved with Katie’s solution. She quickly finds the x value with one line of code for the X value without lining up multiple Decision graphics like you were worried about..



Fred Ernst, PE
C3D 2025
Ernst Engineering
www.ernstengineering.com
Message 5 of 9

ecfernandez
Advisor
Advisor

Hi guys! 

@fcernst is right. Sometimes we post replies almost at the same time. Therefore, I hadn't even noticed that @KMercier_C3D had also posted a very good answer to @Oleg.Konovalov.SIT question. Let's wait for him to see the answer and accept the solution. My respect for @KMercier_C3D; she's the best (in my opinion) at working with SAC.

Best regards!

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn

Hi guys! 

@fcernst is right. Sometimes we post replies almost at the same time. Therefore, I hadn't even noticed that @KMercier_C3D had also posted a very good answer to @Oleg.Konovalov.SIT question. Let's wait for him to see the answer and accept the solution. My respect for @KMercier_C3D; she's the best (in my opinion) at working with SAC.

Best regards!

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn
Message 6 of 9

Oleg.Konovalov.SIT
Enthusiast
Enthusiast
Thank you very much, Kati, for your fast reply! It has worked perfectly. Later on it has brought me to another challenge when I have several lowest points and need to find which one is the most right, or the most left depending on general slope. But that it is another case and if I fail it on my one - will post example.

Again, thanks a lot!

Thank you very much, Kati, for your fast reply! It has worked perfectly. Later on it has brought me to another challenge when I have several lowest points and need to find which one is the most right, or the most left depending on general slope. But that it is another case and if I fail it on my one - will post example.

Again, thanks a lot!
Message 7 of 9

Oleg.Konovalov.SIT
Enthusiast
Enthusiast
totally agreed)

totally agreed)
Message 8 of 9

Oleg.Konovalov.SIT
Enthusiast
Enthusiast
Hi, Camilo! I'm positive that Variables would work too, but using "If" operator inside of Delta Y seems to be faster abd easier. Anyway, thank you very much for your solution!

Hi, Camilo! I'm positive that Variables would work too, but using "If" operator inside of Delta Y seems to be faster abd easier. Anyway, thank you very much for your solution!
Message 9 of 9

ecfernandez
Advisor
Advisor

Hi @Oleg.Konovalov.SIT. Yes, I agree 🙂

Happy to help anyway. Best regards!  

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn

Hi @Oleg.Konovalov.SIT. Yes, I agree 🙂

Happy to help anyway. Best regards!  

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report