How to create a label style to show structure inner length x width or diameter?

How to create a label style to show structure inner length x width or diameter?

Harshit.Khandelwal
Observer Observer
1,833 Views
8 Replies
Message 1 of 9

How to create a label style to show structure inner length x width or diameter?

Harshit.Khandelwal
Observer
Observer

I am working on a pipe network which has both circular and rectangular catchpits. While creating a structure table for the network, I want to show either the inner length x inner width or inner diameter whichever is applicable. Currently it is showing ??? where the data is not available. Attached is a snapshot for reference.

HarshitKhandelwal_0-1675686285603.png

 

0 Likes
1,834 Views
8 Replies
Replies (8)
Message 2 of 9

Joao-Rafael
Advocate
Advocate

Hi, @Harshit.Khandelwal 

To edit data contained in a table in AutoCAD Civil 3D, you need to follow these steps:

Select the table you want to edit in your view.

Click the "Home" tab and select "Table" from the list of tools.

Click the "Edit Table Style" button. This will open the "Edit Table Style" window.

 

In this window, you can customize the columns, fonts, colors, and other aspects of the table.

jralfs_0-1675689982456.png

 

in this list you can select the desired parameters to insert in the column

jralfs_1-1675690276517.png

 

When you have finished customizing the table, click "OK" to save your changes and close the window.

Finally, update the table by clicking the "Update Table" button in the "Table" tab.

Now your table has been edited and the data displayed in the table will conform to the table style settings you defined.


hope this can help you 

 

 

 

At.t

João Rafael A. Dias


[pt] Esse post foi de ajuda para você? Mostre seu Apoio dando uma curtida! Sua pergunta obteve uma resposta que resolveu a duvida? Então clique no botão 'Aceitar Solução '


[en] Did this post help you? Show your support by liking it! Did your question receive an answer that solved your doubts? Then click on the "Accept Solution" button.


[es] ¿Te ayudó esta publicación? Demuestra tu apoyo dándole un me gust. ¿Tu pregunta recibió una respuesta que resolvió tus dudas? Entonces haz clic en el botón "Aceptar solución"



Siga-me // Folow me LinkedIN
0 Likes
Message 3 of 9

MikeEvansUK
Advisor
Advisor

Hi, I struggled with this for ages also

 

There is no way to simply condition the result such that if it's circular or square it will only show the correct value relative to the shape.

 

The only way to do this is through the Property Set information.

 

You'll need to:

Set up a bound shape entry, looking at the bound shape of the structure.

 RESULT="-"

On Error Resume Next

Set oApp=GetObject(, "AutoCAD.Application")

Set oCivilApp=oApp.GetInterfaceObject("[_XUILand]")

Set obj=oCivilApp.ActiveDocument.ObjectIdToObject("[ObjectID]")

Result = Obj.BoundingShape

 

Next add a structure size property to use in labels / tables, then using the boundingshape of the structure obtain the Length \ width or diameter respectively.

 

IF [BoundShape] = "1" then
''Circular
              Shp = (obj.PartDataRecord.FindByContext("StructInnerDiameter").Tag & "mm")
		Result = Shp
ElseIf [BoundShape] = "2" then
''Square \ rectangular
		shp = (Cstr(obj.PartDataRecord.FindByContext("StructInnerLength").Tag) & "mm L x " &Cstr(obj.PartDataRecord.FindByContext("StructInnerLength").Tag) & "mm W" )
		Result = Shp
End If

 

You can't (in 2022) insert the property in the table but you can insert it into a Text Label then copy the string "PS:<???>" out.

 

You can paste this into the table entry and it will now only display the size for rectangular or square accordingly.

 

Mike

Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

Message 4 of 9

MMcCall402
Mentor
Mentor

Maybe get a little creative with your use of the Description or Material values for these structures in order to provide this information for use in the table. 

 

This can be edited into the parts list and table style in your template file so it would happen automatically in the future.

 

 

 

Mark Mccall 
CAD Mangler


EESignature


VHB - Engineering, Inc.

Message 5 of 9

Harshit.Khandelwal
Observer
Observer

hi, 

I looking for a way to show structure's inner dimensions.

0 Likes
Message 6 of 9

Harshit.Khandelwal
Observer
Observer
Hi, thanks for the reply.
But this is beyond my understanding of the Civil 3D. Could you please be a little more elaborative, like how to create bound shape entry and where to add IF/ELSEIF code?
0 Likes
Message 7 of 9

Harshit.Khandelwal
Observer
Observer
Hi,
I already have catchpit type mentioned in the structure description.
0 Likes
Message 8 of 9

Harshit.Khandelwal
Observer
Observer
Hi, I looking for a way to show structure's inner dimensions.
0 Likes
Message 9 of 9

Joe-Bouza
Mentor
Mentor

You should be able to write expression comparing the shape;

 

here is an example I use for different types of leaching basins

IF({Dec_Exp Floor Thickness}=0.5,-1,IF({Dec_Exp Floor Thickness}=3.0,{Dec_Exp Insert Rim}-2.67,IF({Dec_Exp Floor Thickness}=5.5,{Dec_Exp Insert Rim}-5.5,-1)))

 

I used the floor thicknes to determine if I was using a shallow slab or deeper cone. it is an if else type statement the -1 is used if something other is encountered and the table style is set to not show negative value 

 

in pseudo code if round, <dia>,-1, if rect,< len width>,-1 

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature