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

Automatic feature line

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
joantopo
1619 Views, 2 Replies

Automatic feature line

Hi.

I´m checking the civil 3D command "Create feature line from Alignment" but I have seen that the new feature line is an "automatic feature line" because it´s dynamic.

 

If I ask the user to select that feature line in the drawing:

 

  _with1.AddAllowedClass(typeof(Autodesk.Civil.DatabaseServices.FeatureLine), true);

 Then, my utility doesn´t recognize that object because it isn´t a FeatureLine object Type. What object Type is,then?

 

Moreover, the buttons "edit geometry" or "edit elevations" from feature line are disabled. I can revise table (stations and elevations).

I think those forms should be enabled only for read (not write) if we want to read any elevation points.

 

If we deactivate "dynamic link" option,then we can check "edit elevations" and the object is a simple feature line instead of automatic feature line but I don´t want to do this because after I won´t be able to convert it again in dynamic mode.

 

Perhaps, I would like to export "station and elevation" to ASCII file from that automatic feature line.

 

Thanks.

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
2 REPLIES 2
Message 2 of 3
Jeff_M
in reply to: joantopo


@joantopo wrote:

Hi.

I´m checking the civil 3D command "Create feature line from Alignment" but I have seen that the new feature line is an "automatic feature line" because it´s dynamic.

 

If I ask the user to select that feature line in the drawing:

 

  _with1.AddAllowedClass(typeof(Autodesk.Civil.DatabaseServices.FeatureLine), true);

 Then, my utility doesn´t recognize that object because it isn´t a FeatureLine object Type. What object Type is,then?

 

Thanks.


Change the "true" to false, then you can cast it as a Featureline. The "IsEditable" property will be false, but you will be able to get whatever data you need from it.

 

           entOpts.AddAllowedClass(typeof(FeatureLine), false);
            PromptEntityResult entRes = ed.GetEntity(entOpts);
            if (entRes.Status != PromptStatus.OK)
                return;
            using (Transaction tr = HostApplicationServices.WorkingDatabase.TransactionManager.StartTransaction())
            {
                FeatureLine fl = (FeatureLine)entRes.ObjectId.GetObject(OpenMode.ForRead);

             }

 Of course the C3D .NET API doesn't support much for the featurelines so using the methods I previously showed for getting the COM properties by Reflection without COM being loaded will need to be revisited.

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 3
joantopo
in reply to: Jeff_M

All right.

I have just finished my last command.

 

This is the results into a ASCII file to show data from automatic feature lines: (station elevation type(vertex or elevation point)

 

captura.jpg

 

Thanks Jeff.

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

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report