Hi,
could you show the code to explain what you are try to do?
I have a short sample to create profile from surface.
This is not so secret code...
Cheers
Veli V.
Public Function CreateProfileFromSurface(ByVal alignName As String, _
ByVal surfaceName As String, _
ByVal profileName As String, _
ByVal profileStyleName As String, _
ByVal layerName As String) As AeccProfile
Dim ed As Autodesk.AutoCAD.EditorInput.Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim oProfile As AeccProfile
Dim oAlign As AeccAlignment = Me.GetAlignment(alignName)
If oAlign.Name = alignName Then
Try
oProfile = oAlign.Profiles.Item(profileName)
Catch exArg As ArgumentException
Debug.WriteLine("Couldnīt find profile " + profileName)
End Try
If oProfile Is Nothing Then
Dim oProfileStyle As AeccProfileStyle = Me.GetOrCreateProfileStyle(profileStyleName)
Dim oSurface As IAeccSurface = Me.GetSurfaceByName(surfaceName)
If oSurface.Name = surfaceName Then
oProfile = oAlign.Profiles.AddFromSurface(profileName, AeccProfileType.aeccExistingGround, oProfileStyle.Name, oSurface.Name, oAlign.StartingStation, oAlign.EndingStation, layerName)
Else
ed.WriteMessage(vbLf + "Surface " + surfaceName + " doesnīt exist.")
End If
Else
ed.WriteMessage(vbLf + "Profile " + profileName + " already exist.")
End If
End If
Return oProfile
End Function