PROPERTY SETS DEFINITION FOR CIVIL3D OBJECTS NOT SHOWING CORRECT VALUES

PROPERTY SETS DEFINITION FOR CIVIL3D OBJECTS NOT SHOWING CORRECT VALUES

Anonymous
Not applicable
3,098 Views
6 Replies
Message 1 of 7

PROPERTY SETS DEFINITION FOR CIVIL3D OBJECTS NOT SHOWING CORRECT VALUES

Anonymous
Not applicable

Hi All,

 

I was trying to automatically populate some civil 3d pipe properties like the pipe dia and pipe material to the extended properties, I got the VB script from one video in youtube and also from one AU class, But even after replicating the same script, my properties are not getting updated. Below is the script which I used.

RESULT="--"
On ERROR RESUME NEXT
Set oApp=GetObject(,"AutoCAD.Application")
Set oCivilApp=oApp.GetInterfaceObject("AeccXUiLand.AeccApplication.14.0")
Set obj=oCivilApp.ActiveDocument.ObjectIDtoObject("[ObjectID]"]
RESULT=obj.PartDataRecord.FindByContext(401).Tag

 
 

property sets.PNGproperty sets_2.PNG

 

Can anyone help to fix this issue.

 

Thanks,

 

 

0 Likes
Accepted solutions (3)
3,099 Views
6 Replies
Replies (6)
Message 2 of 7

Udo_Huebner
Mentor
Mentor
Accepted solution

Are you using civil 3d 2021? Could you post a simplified sample file as dwg?

Gruß Udo Hübner (CAD-Huebner)
0 Likes
Message 3 of 7

Anonymous
Not applicable

Hi,

I using 2020.3 version of Civil 3D.

AutoCAD Version.PNG

 

I have attached a portion of my file in  the below link. Please let me know if that file is not working for you.

 

https://www.dropbox.com/s/q42x35vr3cjvwih/C3D_CASE.dwg?dl=0

 

Thank you in advance.

 

0 Likes
Message 4 of 7

Udo_Huebner
Mentor
Mentor
Accepted solution

This code should work with 2020

 

RESULT="--"
On Error Resume Next
Set oApp=GetObject(, "AutoCAD.Application")
Set oCivilApp=oApp.GetInterfaceObject("AeccXUiPipe.AeccPipeApplication.13.2") 
Set obj=oCivilApp.ActiveDocument.ObjectIDToObject("[ObjectID]")
RESULT=obj.PartDataRecord.FindByContext(300).Tag

 

With Civil 3D  2021 you have to use 13.3 instead of 13.2

 

You can type in Command: AECVERION to determine the current AEC version number (14 is not out yet).

 

Additional hint: install latest AutoCAD Update 2020.1.3 as well. Q.47 means you never updated the Core AutoCAD functionality.

Gruß Udo Hübner (CAD-Huebner)
0 Likes
Message 5 of 7

Anonymous
Not applicable

Thank you so much Udo..

0 Likes
Message 6 of 7

Anonymous
Not applicable

Hi Udo,

 

Can you please help me with a same type of code to get the name of the structure.

Below is the code which i have tried, property sets_3.PNG

Below is the structure name that i am trying to get to the extended data.

property sets_4.PNG

 

Thank you in advance.

0 Likes
Message 7 of 7

Udo_Huebner
Mentor
Mentor
Accepted solution

>> Below is the code which i have tried, ...

1. To access pipe network data, don't use 

GetInterfaceObject("AeccXUiPipe.AeccXUILand.AeccApplication.13.2")

but use

GetInterfaceObject("AeccXUiPipe.AeccPipeApplication.13.2")

. To access Structure name simply use

RESULT=obj.Name

Keep in mind that ObjectID must be defined as well.

Screenshot from German Civil  2020.4 VersionScreenshot from German Civil 2020.4 Version

 

 

Gruß Udo Hübner (CAD-Huebner)