Im have a bug geting the RightOffset value in a SectionSource of a SampleLine.
...
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
' get the civil document
Dim civilDoc As CivilDocument = CivilApplication.ActiveDocument
Dim selTransversal As New PromptEntityOptions(vbLf & "Seleccione un transversal (SectionView): ")
selTransversal.SetRejectMessage(vbLf & "Solo gráfico de un transversal es permitido (SectionView)")
selTransversal.AddAllowedClass(GetType(SectionView), True)
Dim resSL As PromptEntityResult = ed.GetEntity(selTransversal)
If resSL.Status <> PromptStatus.OK Then
Return False
End If
Dim SectionViewId As ObjectId = resSL.ObjectId
Dim trans1 As Autodesk.AutoCAD.DatabaseServices.Transaction=Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction()
Dim oSectionView As SectionView = trans1.GetObject(SectionViewId, OpenMode.ForWrite)
Dim overrideObj As SectionOverride = oSectionView.GraphOverrides(0)
overrideObj.Draw = True
Dim oSampleLine As Object = trans1.GetObject(oSectionView.ParentEntityId, OpenMode.ForWrite)
Dim d As Double = oSampleLine.getsamplelinewidht()
Dim ocSectionIds As ObjectIdCollection = oSampleLine.getsectionIds()
For Each oSectionId In ocSectionIds
oSource = trans1.GetObject(oSectionId, OpenMode.ForWrite)
Dim Double loff=oSource.LeftOffset
Dim Double roff=oSource.RightOffset
next
The LeftOffset return a correct value, but RightOffset give allways the same value than RightSwathWidth
I try with Civil 3D 2014 and Civil3d 2015.
Any have the same problem and/or solution for this use ?
I need to get the left and right margin of a corridor (catchpoints) in the SectionView