Storing and retrieving ID of feature line inside corridor

Storing and retrieving ID of feature line inside corridor

davidm_adn
Advocate Advocate
761 Views
3 Replies
Message 1 of 4

Storing and retrieving ID of feature line inside corridor

davidm_adn
Advocate
Advocate

I need to let the user pick a feature line which is part of a corridor, attach an object to it, and store which feature line was picked on that object.  Typically this would be a handle of the feature line, or some other unique identifier.

 

I can get the feature line closest to the pick point no problem, by getting all the feature lines out of the corridor, getting their geometry and running a 'closest to' kind of process.  Maybe there is a smarter way to do that but this works for now.

 

But, I can't see anything on the feature line which can tell me which one it is in the corridor.

 

  • The feature lines seem to have names, but I think more than one feature line in a corridor can have the same name.
  • I can't store that it was the nth feature line in the corridor, in case other feature lines are added or removed from the corridor.
  • I can't use the pick point, in case the corridor changes such that a different feature line is now closest to the pick point.

 

Does anyone know anything about doing this?  I am happy to use .NET or COM to achieve it.

 

Thanks for any help.

0 Likes
762 Views
3 Replies
Replies (3)
Message 2 of 4

augusto.goncalves
Alumni
Alumni

I can only see the CorridorFeatureLine.CorridorId property.

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
0 Likes
Message 3 of 4

davidm_adn
Advocate
Advocate

Thank you, yes I saw that one too, but it's the ID of the parent corridor, not an identifier of the feature line itself.

Message 4 of 4

joantopo
Mentor
Mentor

What's a pity!!!

 

In fact, I was thinking in doing this idea with C3D API:

 

https://forums.autodesk.com/t5/autocad-civil-3d-ideas/replace-featureline-to-another-one-as-targets-...

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
0 Likes