Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RightOffset API

0 REPLIES 0
Reply
Message 1 of 1
roddyz
187 Views, 0 Replies

RightOffset API

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

 

 

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report