Get Pipe and Structure Tables via API

Get Pipe and Structure Tables via API

soonhui
Advisor Advisor
84 Views
3 Replies
Message 1 of 4

Get Pipe and Structure Tables via API

soonhui
Advisor
Advisor

It does seem that there is no way to get the Pipe and Structure Table via API? Let alone creating one via C#. Alas some other tables are available though, eg:

 

      [CommandMethod(nameof(GetTables))]
      public void GetTables()
      {
          var doc = CivilApplication.ActiveDocument;
          
          // the below code works
          GetAllTables(doc.GetAlignmentTableIds());
          GetAllTables(doc.GetLegendTableIds());
          GetAllTables(doc.GetParcelSegmentTableIds());
          GetAllTables(doc.GetParcelTableIds());
          GetAllTables(doc.GetPointTableIds());

         
      }

      private static void GetAllTables(ObjectIdCollection tableIDs)
      {
          foreach (ObjectId alignmentTableId in tableIDs)
          {
              
          }
      }

 

Do I miss anything?

##########

Ngu Soon Hui

##########

I'm the Benevolent Dictator for Life for MiTS Software. Read more here


I also setup Civil WHIZ in order to share what I learnt about Civil 3D
85 Views
3 Replies
Replies (3)
Message 2 of 4

jhm_dac
Enthusiast
Enthusiast

I came to the same conclusion after trying to figure it out recently. Short of exploding the table to be able to extract information, I got stuck. Though someone with more API experience may have better insight.

0 Likes
Message 3 of 4

norman.yuan
Mentor
Mentor

@soonhui wrote:

...

... Alas some other tables are available though, ...

...


Even you can get the objects of "other tables" by their ID, there is nothing more you can do: no table related properties/methods are exposed in the API.

Norman Yuan

Drive CAD With Code

EESignature

Message 4 of 4

BlackBox_
Advisor
Advisor

@norman.yuan wrote:

@soonhui wrote:

...

... Alas some other tables are available though, ...

...


Even you can get the objects of "other tables" by their ID, there is nothing more you can do: no table related properties/methods are exposed in the API.


As evidenced by Project Explorer using vanilla AutoCAD Table with cell values that just get updated dynamically. 


"How we think determines what we do, and what we do determines what we get."

Sincpac C3D ~ Autodesk Exchange Apps

0 Likes