Is it possible to set the Start Point of an AeccSurveyFigure? I can create and add arcs and lines to the survey figure, but I'm not seeing where I can set the start or end point of it. There is a Start Point property for X and Y, but those are both ReadOnly. I'm also not seeing a way to delete nodes from the survey figure because I could then add a line from the orgin to the start point and then delete the first one.
Public Shared Function CreateSurveyFigureFromPolyline(ByRef polyObjId As ObjectId, ByVal figureName As String) As Handle ' Get the AutoCAD Editor Dim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor ' Get the Survey Application and AeccSurveyDatabase Dim oAcadApp As Autodesk.AutoCAD.Interop.AcadApplication = GetObject(, "AutoCAD.Application") Dim oAeccSurveyApp As AeccSurveyApplication = oAcadApp.GetInterfaceObject(ceApp.SurveyAppProgId) Dim oAeccSurveyDoc As AeccSurveyDocument = oAeccSurveyApp.ActiveDocument Dim oAeccSurveyDB As AeccSurveyDatabase = oAeccSurveyApp.ActiveDocument.Database Dim surveyProj As AeccSurveyProject = oAeccSurveyDB.CurrentProject If surveyProj IsNot Nothing Then ' now we can access the various Props of AeccSurveyProject object Dim newSurvFigure As AeccSurveyFigure = surveyProj.Figures.Create(figureName) Dim poly As Polyline = TryCast(polyObjId.GetObject(OpenMode.ForRead), Polyline) For i As Integer = 0 To poly.NumberOfVertices - 1 If poly.GetSegmentType(i) = SegmentType.Arc Then Dim arcS As CircularArc3d = poly.GetArcSegmentAt(i) newSurvFigure.AddArc(arcS.Radius, poly.GetBulgeAt(i), arcS.Center.X, arcS.Center.Y, arcS.EndPoint.X, arcS.EndPoint.Y) Else Dim lne As LineSegment3d = poly.GetLineSegmentAt(i) Dim azmith As Double = Math.Atan((lne.EndPoint.X - lne.StartPoint.X) / (lne.EndPoint.Y - lne.StartPoint.Y)) newSurvFigure.AddLineByAzimuthDistance(azmith, lne.Length) End If Next newSurvFigure.IsClosed = poly.Closed Dim objIdLong As Long = newSurvFigure.AddToDrawing() Dim hndle As Handle = New Handle(objIdLong) Return hndle End If Return Nothing End Function
Solved! Go to Solution.
Solved by Civil3DReminders_com. Go to Solution.
The first AddLine takes you from 0,0 to the location where you want the surveyfigure to start. It then builds off that, so the First Line really isn't a first line.
It also looks like all of the information needs to be entered in as meter values, even if you are in a feet units drawing and feet units for the survey database.