Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Property Sets - Extract Name from Feature Line or Parcel objects

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Michael.Sweeney3
292 Views, 2 Replies

Property Sets - Extract Name from Feature Line or Parcel objects

I am trying to create Property Set definitions (attributes) for parcel objects and feature line objects.  I have used the solution listed here: PROPERTY SETS DEFINITION FOR CIVIL3D OBJECTS NOT SHOWING CORRECT VALUES to use the object handle to get the name.  It worked, but after a few days it has stopped working all of a sudden.  Now the name attribute is only listing "--".

 

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

 

The solution listed above is geared to pipes and structures (AeccXUiPipe.AeccPipeApplication), but it was working with my parcel objects and feature lines until yesterday.  Aside from the fact that if it was working Tuesday it should also be working Friday 🤔.... is there code that is geared to parcel objects or feature line objects?

 

I'm using Civil 3D 2021.2 (AECVERSION 13.3).

 

Attached is a test file I just created.  I was thinking maybe it was an issue with my original drawing, so I created a new drawing to test it.  Still having the issue though.  There is a feature line and a parcel in this test file that someone could test on.

 

 

 

 

2 REPLIES 2
Message 2 of 3
KirkWM
in reply to: Michael.Sweeney3

I have 2022 installed so I changed it to 13.4 and it worked for me, perhaps try that incase an update changed the aec version. You can check your version by typing in the command AECVERION to check. Instead of the UIPIPE you can also try "AeccXUiLand.AeccApplication.13.3".

Message 3 of 3
Michael.Sweeney3
in reply to: KirkWM

@KirkWM thanks for the info.  I will use that code since parcels are more related to that, although the Pipe functions seem to work the same.

 

Since my post last week, I was able to isolate the issue.  I have 2021 and 2019 installed on my machine.  The formula works perfect in 2019 (using .13.0 in the code).  It works fine in 2021 if I have only that open.  But once I open Civil 2019 and go back to 2021, the formula breaks.  Closing 2019 and then restarting 2021 fixes the problem.

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report