ah yes, i had forgotten about that forum. ah well that was pretty easy, i was missing an import so i never saw teh "ProfileViewStyle", thanks for the help! heres what i did with it:
Imports System
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.Civil
Imports Autodesk.Civil.ApplicationServices
Imports Autodesk.Civil.DatabaseServices.Styles
Imports Autodesk.Civil.Settings
' This line is not mandatory, but improves loading performances
<Assembly: CommandClass(GetType(ProfileLabelSettings.MyCommands))>
Namespace ProfileLabelSettings
Public Class MyCommands
<CommandMethod("profilelabelsettingsbottom")>
Public Sub proflabbot()
Dim cdoc As CivilDocument = CivilApplication.ActiveDocument
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database
Dim proflabplace As SettingsCmdAddNetworkProfLabels = cdoc.Settings.GetSettings(Of SettingsCmdAddNetworkProfLabels)()
Dim profviewstyle As ProfileViewStyle = Nothing
Dim structbot As String
Using tr As Transaction = db.TransactionManager.StartTransaction()
If profviewstyle.GraphStyle.Direction = GraphDirectionType.LeftToRight Then
structbot = "MKA - Profile Structure Bottom Up Stream(L) to Down Stream(R)"
Else
structbot = "MKA - Profile Structure Bottom Down Stream(L) to Up Stream(R)"
End If
Dim pipebot As String = "MKA - None"
proflabplace.ProfileLabelPlacement.StructureLabelPlacement.Value = StructureProfileLabelPlacementType.AtStructureBottom
proflabplace.Styles.StructureProfileLabel.Value = structbot
proflabplace.ProfileLabelPlacement.DimensionAnchorOptionForStructures.Value = DimensionAnchorOptionType.Below
proflabplace.ProfileLabelPlacement.DimensionAnchorPlotHeightValueForStructures.Value = 2 / 12
proflabplace.Styles.PipeProfileLabel.Value = pipebot
tr.Commit()
End Using
ed.WriteMessage(vbCrLf + "Structure Label Placement is: " + proflabplace.ProfileLabelPlacement.StructureLabelPlacement.Value.ToString())
ed.WriteMessage(vbCrLf + "Structure Label is: " + proflabplace.Styles.StructureProfileLabel.Value.ToString())
ed.WriteMessage(vbCrLf + "Pipe Label is: " + proflabplace.Styles.PipeProfileLabel.Value.ToString())
End Sub
<CommandMethod("profilelabelsettingstop")>
Public Sub proflabtop()
Dim cdoc As CivilDocument = CivilApplication.ActiveDocument
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database
Dim proflabplace As SettingsCmdAddNetworkProfLabels = cdoc.Settings.GetSettings(Of SettingsCmdAddNetworkProfLabels)()
Dim structop As String = "MKA - Profile Structure Top"
Dim pipetop As String = "MKA - Size Slope Profile"
Using tr As Transaction = db.TransactionManager.StartTransaction()
proflabplace.ProfileLabelPlacement.StructureLabelPlacement.Value = StructureProfileLabelPlacementType.AtStructureTop
proflabplace.Styles.StructureProfileLabel.Value = structop
proflabplace.ProfileLabelPlacement.DimensionAnchorOptionForStructures.Value = DimensionAnchorOptionType.Above
proflabplace.ProfileLabelPlacement.DimensionAnchorPlotHeightValueForStructures.Value = 1 / 12
proflabplace.Styles.PipeProfileLabel.Value = pipetop
tr.Commit()
End Using
ed.WriteMessage(vbCrLf + "Structure Label Placement is: " + proflabplace.ProfileLabelPlacement.StructureLabelPlacement.Value.ToString())
ed.WriteMessage(vbCrLf + "Structure Label is: " + proflabplace.Styles.StructureProfileLabel.Value.ToString())
ed.WriteMessage(vbCrLf + "Pipe Label is: " + proflabplace.Styles.PipeProfileLabel.Value.ToString())
End Sub
End Class
End Namespace