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: 

Getting Daylight point offset from Baseline at every station

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
410 Views, 3 Replies

Getting Daylight point offset from Baseline at every station

Hi,

 

I am writing a program to get the daylight point offset from the baseline at every station on the applied assembly and i am facing two problems

 

- The station output is not sorted how can i get the station output be sorted in sequence

- The daylight point offset output is not the same offset drawn on the corridor drawing after checking Do you have any idea? I checked other pointcodes (E.g. EPS, ETW) and the offset values was right, the problem is only at the daylight points

 

Dim

opt AsPromptEntityOptions = NewPromptEntityOptions("Select a Corridor")

opt.SetRejectMessage("Object Must be a Corridor")

opt.AddAllowedClass(GetType(Corridor), False)

Dim a1 AsObjectId= ed.GetEntity(opt).ObjectId

Dim a2 AsCorridor = mytrans.GetObject(a1, OpenMode.ForRead)

MsgBox("Corridor= "& a2.Name.ToString)

Dim b1 AsBaseline = a2.Baselines.Item(0)

For

Each basereg AsBaselineRegionIn b1.BaselineRegions

For

Each **** AsAppliedAssemblyInbasereg.AppliedAssemblies

Dim p1 AsCalculatedPointCollection = ****.PointsByCode("Daylight")

Dim z AsInteger= p1.Count

if z <> 0 Then

MsgBox(p1(0).StationOffsetElevationToBaseline.X.ToString)

MsgBox(p1(0).StationOffsetElevationToBaseline.Y.ToString)

MsgBox(p1(0).StationOffsetElevationToBaseline.Z.ToString)

EndIf

Next

Next

 

Thanks,

 

Tamer Mourad

3 REPLIES 3
Message 2 of 4
Civil3DReminders
in reply to: Anonymous

Get the FeatureLine from the baseline instead, it will come out in order. The feature line location should be correct. 

 

Christopher 

http://blog.civil3dreminders.com/

Message 3 of 4
Anonymous
in reply to: Civil3DReminders

Thanks, but i still need it using point code because i will need daylightfill as well. Also i dont know why the offset output is incorrect. Do you have any idea?

Message 4 of 4
Civil3DReminders
in reply to: Anonymous

The feature line extracts based on point code, so you shouldn't have any issues there.

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report