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: 

Line/Curve/Spiral Table Tag numbering

19 REPLIES 19
Reply
Message 1 of 20
Jeff_M
1792 Views, 19 Replies

Line/Curve/Spiral Table Tag numbering

Is it possible to access (get/set) the tag numbers for these labels? I've been looking for a while now and don't see how, just hoping that I've overlooked something. This is for 2010 and/or 2011.

 

Thanks!

Jeff_M, also a frequent Swamper
EESignature
19 REPLIES 19
Message 2 of 20
Partha.Sarkar
in reply to: Jeff_M

Hi Jeff,

 

Would it be possible to share a DWG file highlighting these Tag numbers you mentioned here ? I can take a look into the API once I understand what these Tag number you are referring here.

 

Thanks,

 

Partha Sarkar

Autodesk



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Message 3 of 20
Sinc
in reply to: Partha.Sarkar

Tag numbers are used when creating Line and Curve tables.  They let us do things like label the lines and curves with labels like "L1", "L2", and "C1", then have tables that list the full data for each line or curve.

Sinc
Message 4 of 20
Jeff_M
in reply to: Partha.Sarkar

Sure thing, Partha!

Jeff_M, also a frequent Swamper
EESignature
Message 5 of 20
joshuamodglin
in reply to: Jeff_M

Hey Jeff,

 

There are so many places where this is set. The label itself, the drawing setting level, the general settings, parcel (site), and alignment (site). What are you looking to get/set??

 

Would this help?

 

 

Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument.Settings.TagSettings.Creation

 

 

Josh Modglin
Advanced Technologies Solutions Logo
Message 6 of 20
Jeff_M
in reply to: joshuamodglin

I want to select a Tag and be able to determine what is displayed. IOW, I select the tag that says "L1" and I'd like to renumber it to the value in  CivilApplication.ActiveDocument.Settings.TagSettings.Renumbering.LinesStartingNumber.

 

But I need to know what the current number for the label is to determine whether it is a duplicate number.

 

The ultimate goal is to have a better (for me) EditTagNumbers command.

Jeff_M, also a frequent Swamper
EESignature
Message 7 of 20
joshuamodglin
in reply to: Jeff_M

Interesting...I will have to look into it more when I get a chance but from a cursory review I would have to say "not available".

 

The only thing I can think of is to try to set override text and see what text is available then but I bet it is just the overridden static text.

 

You have Partha looking into it also. Are you on ADN?

 

I will post something if I find anything. Hope you will do the same.

 

Josh Modglin
Advanced Technologies Solutions Logo
Message 8 of 20
Jeff_M
in reply to: joshuamodglin

Yeah, the Textoverride is out, because that can still hold the formatting for the Tag without revealing what that tag is.

 

Nope, not on ADN at this time, someday soon though.

 

If I figure something out, I will be sure to post it here. Thanks for taking a look, Josh.

Jeff_M, also a frequent Swamper
EESignature
Message 9 of 20
Partha.Sarkar
in reply to: Jeff_M

Thanks for the DWG !

 

I did some research, but couldn't see any API available to access the Tag numbers of these labels.
I don't see property exposed to get / set the tag number of Autodesk.Civil.DatabaseServices.Label object.

I was not able to edit them using UI tools (Hope I am not missing any steps to do so).

 

 

Thanks,

 

Partha Sarkar

Autodesk



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Message 10 of 20
Jeff_M
in reply to: Partha.Sarkar

OK. Thanks for confirming my findings, Partha. I will continue to use my workaround, which involves the existing EditTagNumbers command, until this is exposed to us.

Jeff_M, also a frequent Swamper
EESignature
Message 11 of 20
tyronebk
in reply to: Jeff_M

Was access to the segment number ever exposed through the API? It doesn't look like it was but I might be overlooking something. TIA.
Message 12 of 20
Jeff_M
in reply to: tyronebk

Not as far as I can tell. Still wishing...
Jeff_M, also a frequent Swamper
EESignature
Message 13 of 20
Partha.Sarkar
in reply to: tyronebk

Hi Jeff and All,

 

I revisted this quickly and I can confirm you that now we can access the Label style text component.

Could you try the following approach ? Please check this blog post in our IM DevBlog -

 

http://adndevblog.typepad.com/infrastructure/2013/04/get-cogopoint-label-text.html

 

Does it help ?

 

Thanks,



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Message 14 of 20
Jeff_M
in reply to: Partha.Sarkar

Partha, we've been able to get the Override for sometime npow. However, as Augusto notes in the blog, "Unfortunately this will output the format of the text, as shown on the Text Component Editor, not the actual value."

 

I can determine if the Label being used is in Tag or Label mode, but not what the actual label reads...and no way to edit the Numbers even if we could read it.

 

            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                GeneralSegmentLabel lbl = (GeneralSegmentLabel)pselect.ObjectId.GetObject(OpenMode.ForRead);
                LabelStyle style = (LabelStyle)lbl.LineLabelStyleId.GetObject(OpenMode.ForRead);
                if (style.Properties.Label.DisplayMode.Value == LabelDisplayModeType.Tag)
                {
                    LabelStyleTextComponent tag = null;
                    foreach (ObjectId tcId in lbl.GetTextComponentIds())
                    {
                        LabelStyleTextComponent tc = (LabelStyleTextComponent)tcId.GetObject(OpenMode.ForRead);
                        if (tc.Name == "Table Tag")
                        {
                            tag = tc;
                            break;
                        }
                    }
                    string contents = lbl.GetTextComponentOverride(tag.ObjectId);
                }
                tr.Commit();
            }

 

 

Jeff_M, also a frequent Swamper
EESignature
Message 15 of 20
Partha.Sarkar
in reply to: Jeff_M

Ah...yes, I am aware of this and I had already logged an internal API wish list - ".NET API to Access Label Text value".

 

Thanks,

Partha



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Message 16 of 20

Was this API wish ever resolved?

 

-Mark

Message 17 of 20

I think the more important question is "Is anyone at Autodesk even working on new Civil 3D API features?"

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
Message 18 of 20
MarkPendergraft
in reply to: Jeff_M

I know what you mean... It's unfortunate, access to the tag numbers means I could make civil 3d's tag labels renumber in an intelligent fashion.
Message 19 of 20
FDGJames
in reply to: MarkPendergraft

Bump

 

This is still an issue.


AutoCAD Civil 3D 2018.3
Message 20 of 20
christopher
in reply to: Jeff_M

I think a new post would be a better option than a bump. New posts can get logged in Salesforce as a new case. Bumps don't get a new case. Sometimes new cases can be seen as increased demand for a feature.

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

Post to forums  

Rail Community


Autodesk Design & Make Report