How to extract names and Sump Elevtion into property sets

How to extract names and Sump Elevtion into property sets

Anonymous
Not applicable
3,274 Views
22 Replies
Message 1 of 23

How to extract names and Sump Elevtion into property sets

Anonymous
Not applicable

Hi all relatively new to Civil 3D and I need to create property sets of manholes which incudes the name of each manhole (MH-SW-01 on so on) and its

invert level and cover level - but I can't find a away of accessing this information in property sets.

would be grateful of any help...

thanks Chris

0 Likes
Accepted solutions (1)
3,275 Views
22 Replies
Replies (22)
Message 2 of 23

Jay_B
Mentor
Mentor

You may find this Civil Immersion video by Jeff Bartels helpful.

 

 Using Civil 3D Property Sets to add extended attribution to ANY object

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit
0 Likes
Message 3 of 23

cwr-pae
Mentor
Mentor

This will give you guidance to get started. You will have to figure out the obj. call. For cogo points I had to use the applies to type as "point entity" as well as "cogo point" to get the obj.name, obj.elvation and obj.number calls to work. For drainage structures you may need to apply to "aecc_network_part" and "structure" and maybe others objects.

0 Likes
Message 4 of 23

drazen.galic
Collaborator
Collaborator

Hi,

 

In addition to link which @cwr-pae gave you, I attach additional thread in DG where we solved some problems regarding issue which you need. Look at the second part of post (it started with another problem of accuracy in IFC). Link to thread: LINK

 

Regards,

 

Drazen

0 Likes
Message 5 of 23

Anonymous
Not applicable

Thanks all for the replies, I will be looking at all the useful information you have posted, this on Monday when I am back at work

thanks Chris

0 Likes
Message 6 of 23

Anonymous
Not applicable

Not having much luck with this so far would this formula work to get the Cover Level?

 

Result="--"

On Error Resume Next

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

Set oCivilApp=oApp.GetInterfaceObject("AeccXUiLand.AeccApplication.11.0")

Set obj=oCivilApp.ActiveDocument.HandleToObject("[Handle]")

RESULT=obj.Structure.RimElevation

 

I don't think I understanding programing or the object names enough to achieve my end result...

thanks Chris

0 Likes
Message 7 of 23

Anonymous
Not applicable

What if you set up a structure table with the data you want and extract it from the table?

0 Likes
Message 8 of 23

drazen.galic
Collaborator
Collaborator

Hi @Anonymous,

 

I did it. I attached three pictures:

 

1. Final result with Rim elevations of start and end structures:

 

1 Properties.PNG

The next picture shows definition of all data (property set data)

 

2 Property set data all.PNG

 

The last picture shows real definition:

3 definition rim elevation.PNG

 

In advance I give you the code:

 

Start structure rim elevation:

 

Result="--"
On Error Resume Next
Set oApp=GetObject(, "AutoCAD.Application")
Set oCivilApp=oApp.GetInterfaceObject("AeccXUiLand.AeccApplication.12.0")
Set obj=oCivilApp.ActiveDocument.HandleToObject("[Handle]")
RESULT=obj.StartStructure.RimElevation

 

 

End structure rim elevation:

 

Result="--"
On Error Resume Next
Set oApp=GetObject(, "AutoCAD.Application")
Set oCivilApp=oApp.GetInterfaceObject("AeccXUiLand.AeccApplication.12.0")
Set obj=oCivilApp.ActiveDocument.HandleToObject("[Handle]")
RESULT=obj.EndStructure.RimElevation

 

 

Be careful about Civil 3D version. Mine is 18 (12.0).

 

Hopefully it will help you

 

Regards,

 

Drazen

 

If you think that it is solution to your post, please press Accept as Solution.

0 Likes
Message 9 of 23

Anonymous
Not applicable

Thank you Drazen, unfortunately I can't get it to work, Do I need End_S and Start_S defined to get it to work? if so can you cut and paste the code

for these two property sets? Also End_S and Start_S seems to be the way to get the names of the structures into a property set?

thanks Chris 

0 Likes
Message 10 of 23

drazen.galic
Collaborator
Collaborator
Accepted solution

Hi @Anonymous,

 

It is tricky. I started from the scratch to explain everything to you and suddenly nothing functions any more.

 

But I think that I found what is problem.

 

Definitely you do not need End_S and Start_S. You are right, those values are structure names.

 

Procedure should be as follows:

 

1. Create new property set data. Apply it to the pipes.

2. Create the first data - Handle. Icon on the right - Add Automatic property definition.

3. Create the next data for rim elevation of first structure - Add formula property definition. When the dialog opens, name it properly (i.e. Start_Rim). Copy the code which I sent you. Be careful, not to copy any empty spaces at the end of code (think that it was my problem previously). Now, the most important thing. In the code there is value [Handle]. When you copy the code it became the plain text. Carefully erase that text inside "" and when your pointer is inside of "", double pick in below part of the dialog (Insert property definitions) on value Handle. The value [Handle] should appear in upper part. If you pick on it you can see it is selected.

4. Repeat everything for rim elevation of second structure.

 

 

As I said it is tricky. I would be next two hours in the office and maybe I can assist you through Skype. My skype name is drazen-ars

 

Regards,

 

Drazen

 

Message 11 of 23

Anonymous
Not applicable

Hi Drazen thanks for all your help, I have managed to get the Cover Level from a structure to work by using this modification of your code:-


Cover_Level

 

RESULT="--"
On Error Resume Next
Set oApp=GetObject(, "AutoCAD.Application")
Set oCivilApp=oApp.GetInterfaceObject("AeccXUiPipe.AeccPipeApplication.11.0")
Set obj=oCivilApp.ActiveDocument.HandleToObject("[Handle]")
RESULT=obj.RimElevation

 

 

thanks Chris

0 Likes
Message 12 of 23

Anonymous
Not applicable

Hi Drazen, sorry to be a pain but, I have just gone into civil 3d this morning and the property sets that where working perfectly yesterday have -- as their result any idea how to get them working again?

 

thanks Chris

0 Likes
Message 13 of 23

drazen.galic
Collaborator
Collaborator
Sorry. I am not able to check that now. Maybe tomorrow. I am skiing. Of course do not have my computer. 😟
0 Likes
Message 14 of 23

Anonymous
Not applicable

Hi Drazen don't worry it can wait until Monday - enjoy your skiing (...jealous!)

cheers Chris

0 Likes
Message 15 of 23

drazen.galic
Collaborator
Collaborator
Hi Chris,
Please check "handle" value. If you can, attach example drawing.
Regards
Drazen
0 Likes
Message 16 of 23

drazen.galic
Collaborator
Collaborator

Hi Chris,

 

I opened my drawing from the other day and everything is correct. Property data are there and function. As I said in previous post check value handle. And if you can attach the drawing so I can check.

 

Regards,

 

Drazen

0 Likes
Message 17 of 23

Anonymous
Not applicable

Hi Drazen, thanks for the reply,I will check the handle value object, also I will send you a drawing so you can check it when I am next back in the office.

  1. Thanks Chris
0 Likes
Message 18 of 23

Anonymous
Not applicable

Hi Drazen, no luck with playing with the handle property - I have attached an drawing for you to look at

thanks Chris

0 Likes
Message 19 of 23

drazen.galic
Collaborator
Collaborator

Hi @Anonymous

 

Not a good news for you. At least I think that. Just open your file in C3D 2017 and everything is correct as you can see from below picture.

 

It works for me.PNG

 

 

Drazen

0 Likes
Message 20 of 23

Anonymous
Not applicable

Hi Drazen so when you open it works straight away when I open it doesn't - must be something to do with my setup I guess

at less from the screen grab I can see I have spelt information wrong...!

cheers Chris

0 Likes