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: 

Label Group

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
joantopo
594 Views, 3 Replies

Label Group

Hi.

 

I would like to show all "Label Styles Sample Line" in a datagridview.

 

I have this, but how I get "LabelStylesSampleLineRoot"?

 

     Autodesk.Civil.DatabaseServices.Styles.LabelStylesSampleLineRoot estilosEtiquetas= civDoc. .................;

                    Autodesk.Civil.DatabaseServices.Styles.LabelStyleCollection collEstilos = estilosEtiquetas.LabelStyles;

 

Moreover, I want to show a checkbox column in datagrid to show if each style is added in Label Group Sample Line.

 

Autodesk.Civil.DatabaseServices.SampleLineLabelGroup

 Is it one group for each sample line or one group for the sample line group?

 

How can I get it?

 

I have been looking for in Sample line group object but I don´t find it.

 

In the case of Alignment, it has the method GetLabelGroupIds but it is OBSOLETE.

 

Perhaps, I had to look for in LabelGroup object but then, where is the Label Group sample line?

 

Thanks in advance.

 

 

 

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

I have seen  this method for Sample Line Group objects :

 

SampleLineGroup.GetAvailableSampleLineLabelGroupIds()

 

which returns an ObjectIdcollection.

 

However I don´t understand why Sample Line Group is able to have several Sample Line Label groups.

 

 

 

 

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

 Autodesk.Civil.DatabaseServices.Styles.LabelStylesSampleLineRoot estilosEtiquetas= civDoc.Styles.LabelStyles.SampleLineLabelStyles;
                    Autodesk.Civil.DatabaseServices.Styles.LabelStyleCollection collEstilos = estilosEtiquetas.LabelStyles;

                   for(int i=0;i<=collEstilos.Count-1;i++)
                   {
                   Autodesk.Civil.DatabaseServices.Styles.LabelStyle estil= trans.GetObject(collEstilos[i],OpenMode.ForRead) as Autodesk.Civil.DatabaseServices.Styles.LabelStyle;

                   string nombre = estil.Name;
                   ObjectId id = estil.ParentLabelStyleId;
                   }

 

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 4
quangpt.tric
in reply to: joantopo

Hi @joantopo,

Can we assignt Label Sample Styles foreach Sample Line?

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

Post to forums  

Rail Community


Autodesk Design & Make Report