Jump to content

Recommended Posts

Posted

I am trying to read superelevation data from Civil 3D 2012 by VBA, but it is not successful, I think the problem is establishing reference for Superelevation

only for Civil 3D 2012.

Maybe somebody can help.

Thanks.

 

PM

Posted

Welcome to CADTutor!

 

Could you post the code you're using (that is not successful), so that we may help you?

Posted

With no code are you opening the AeccXUiLand.AeccApplication.

Posted

Please, see the code below:

 

Dim oApp As AcadApplication

Set oApp = ThisDrawing.Application

' NOTE - Always specify the version number.

Const sAppName = "AeccXUiLand.AeccApplication.9.0"

 

Dim g_oCivilApp As AeccApplication

Set g_oCivilApp = oApp.GetInterfaceObject(sAppName)

If (g_oCivilApp Is Nothing) Then

MsgBox "Error creating " & sAppName & ", exit."

Exit Sub

End If

Dim g_oDocument As AeccDocument

Set g_oDocument = g_oCivilApp.ActiveDocument

Dim ObjAlignment As AeccAlignment

Set ObjAlignment = g_oDocument.AlignmentsSiteless.Item(0)

''''''''''''''''''''''''''''''''''''''''''''''''''''''''

MsgBox ObjAlignment.Name

'Up to here All Ok !

'But how can I make reference to "SuperElevationDataElement"

'see next link:

'http://docs.autodesk.com/CIV3D/2012/ENU/API_Reference_Guide/com/civil_om_civil.htm

 

PM

Posted

Keep going down the tree maybe

 

Dim objalignmentname as objalignment.name ?

set objsuper = objalignmentname.SuperElevationDataElement

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...