Get error message when try to run code aeccDoc.Surfaces (aeccDoc = AeccDocument)

Get error message when try to run code aeccDoc.Surfaces (aeccDoc = AeccDocument)

handgth
Enthusiast Enthusiast
1,383 Views
7 Replies
Message 1 of 8

Get error message when try to run code aeccDoc.Surfaces (aeccDoc = AeccDocument)

handgth
Enthusiast
Enthusiast

Hi everyone,

 

I'm trying to create tin surface from LandXml file by using IAeccSurfaces Interface.

 

1634142145048.jpg

 

(https://adndevblog.typepad.com/infrastructure/2012/12/creating-a-tin-surface-from-landxml-file.html)

 

But I got the error message in row  "Autodesk.AECC.Interop.Land.AeccSurfaces oAeccSurfaces = aeccDoc.Surfaces;"

1634142438608.jpg

 

How can I fix this problem?

Or Is there any other way I can create TinSurface from file LandXml ?

 

Thanks everyone.

0 Likes
Accepted solutions (2)
1,384 Views
7 Replies
Replies (7)
Message 2 of 8

Todd_Rogers
Mentor
Mentor

See if @Civil3DReminders_com can help out...

Todd Rogers
Civil Administration
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.

Message 3 of 8

Jeff_M
Consultant
Consultant

Which release of Civil 3D are you coding for? Do you really need to be using the COM API? There is now a .NET API method to create a TinSurface from a LandXML file.

Jeff_M, also a frequent Swamper
EESignature
Message 4 of 8

Civil3DReminders_com
Mentor
Mentor
Accepted solution

You have to change this line: 

string sAppName = "AeccXUiLand.AeccApplication.10.0"; // Civil 3D 2013

to match the version of Civil 3D you are using. 

I'd suggest using the method Jeff shows here to never have to use the string again: 
https://forums.autodesk.com/t5/civil-3d-customization/aeccxuiland-aeccapplication/m-p/8775700/highli... 

 

 

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
Message 5 of 8

handgth
Enthusiast
Enthusiast

I'm working with Civil3d 2020 and Civil3d 2021.

No, I don't. I can not find that method in .NET API ... so I have to use the method in COM API.
Could you please send me the .NET API method to create a TinSurface from a LandXML file?

Thank you.

 

0 Likes
Message 6 of 8

hosneyalaa
Advisor
Advisor
Accepted solution

This. method to create a TinSurface from a LandXML file?

 

https://help.autodesk.com/view/CIV3D/2022/ENU/?guid=e3344531-c49f-503d-1a47-d26ff98faf21

 

Message 7 of 8

handgth
Enthusiast
Enthusiast

Thank you

0 Likes
Message 8 of 8

handgth
Enthusiast
Enthusiast
Thank you.
0 Likes