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: 

Why Baseline object doesn´t have ObjectId property?

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
joantopo
358 Views, 6 Replies

Why Baseline object doesn´t have ObjectId property?

  //corr is Corridor Object.

BaselineCollection BLcoll = corr.Baselines;


foreach (Baseline bl in BLcoll)
{
bl.Name;   //OK.

bl.Id;  //NOT EXIST.

}

 I can´t do a directly a transaction with Id.  I have to do a "foreach" in BaselineCollection to look for the same name.

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

You can look for a specific Baseline name like this:

string blname = "name to find";
bl = BLcoll.Item(blname);
Jeff_M, also a frequent Swamper
EESignature
Message 3 of 7
joantopo
in reply to: Jeff_M

It seems that BaseLineCollection not include a "Item" definition.

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

I will have to check, but the Help says that property exists:
http://docs.autodesk.com/CIV3D/2014/ENU/API_Reference_Guide/html/47853089-fd97-3eda-9f46-487eb7cbee4...
Jeff_M, also a frequent Swamper
EESignature
Message 5 of 7
joantopo
in reply to: Jeff_M

In API 2015:

 

as.jpg

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

Looking at the ObjectBrowser in Visual Studio, this should work:
Baseline pp = corr[5];
Baseline js = corr["prueba"];
Jeff_M, also a frequent Swamper
EESignature
Message 7 of 7
joantopo
in reply to: Jeff_M

Ok.

Right now it works fine.

 

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