Name Example
Examples:
l CrossSectionBlock (Civil Engineering Feature)
l CrossSectionSurface (Civil Engineering Feature)
l DEMFile
l Drawing
l FGProfiles (Civil Engineering Feature)
l Parcel
l ProfileBlock (Civil Engineering Feature)
l Project
l Surface
Sub Example_Name_AeccContourStyle()
' This example returns the Name for the contour style in the dictionary
Dim objContourStyle As AeccContourStyle
Set objContourStyle = ThisDrawing.Dictionaries("AECC_CONTOUR_STYLES").Item(0)
MsgBox "The value for the ContourStyle Name is: " & objContourStyle.Name, vbInformation, "Name Example"
End Sub
Sub Example_Name_Alignment()
' This example returns the Name for the first Alignment in the collection
Dim align As AeccAlignment
Set align = AeccApplication.ActiveProject.Alignments.Item(0)
MsgBox "The Name of the first Alignment is: " & align.Name, vbInformation, "Name Example"
End Sub
Sub Example_Name_CogoPoint()
' This example returns the Name for the first CogoPoint in the collection.
Dim cogoPnt As AeccCogoPoint
Set cogoPnt = AeccApplication.ActiveProject.CogoPoints.Item(0)
MsgBox "The Name for the first CogoPoint in the collection is: " & cogoPnt.Name, vbInformation, "Name Example"
End Sub
Sub Example_Name_CrossSectionBlock()
' This example returns the name of the profile for the
' first alignment cross section in the collection.
Dim alignXSects As AeccCrossSectionBlocks
Dim alignXSect As AeccCrossSectionBlock
Set alignXSects = AeccApplication.ActiveDocument.CrossSectionBlocks
Set alignXSect = alignXSects.Item(0)
'Get the station for the first alignment cross section in the collection
Dim station As String
station = alignXSect.station
MsgBox "The profile name for the alignment cross section at station " & station & " is: " & _
alignXSect.Name, vbInformation, "Name Example"
End Sub
Sub Example_Name_CrossSectionSurface()
' This example returns the name for the first cross
' section surface in the collection for the first cross section
' in the collection.
Dim aligns As AeccAlignments
Dim align As AeccAlignment
Dim xSect As AeccCrossSection
Dim xSectSurf As AeccCrossSectionSurface
Set aligns = AeccApplication.ActiveProject.Alignments
Set align = aligns.Item(0)
Set xSect = align.CrossSections.Item(0)
Set xSectSurf = xSect.CrossSectionSurfaces.Item(0)
' Get the cross section station and format it
Dim station As String
station = aligns.DoubleToStaFormat(xSect.station)
MsgBox "The name for the first cross section surface for " & vbCrLf & _
"the cross section at station " & station & " is: " & _
xSectSurf.Name, vbInformation, "Name Example"
End Sub
Sub Example_Name_DEMFile()
' This example returns the Name for the first DEMFile in the
' first surface in the collection.
Dim surf As AeccSurface
Dim DEMFile As AeccDEMFile
Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
Set DEMFile = surf.Inputs.DEMFiles.Item(0)
MsgBox "The Name for the first DEMFile is: " & DEMFile.Name, _
vbInformation, "Name Example"
End Sub
Sub Example_Name_DescriptionKeyFile()
' This function gets the DescriptionKeyFile name
Dim dKeyFile As AeccDescriptionKeyFile
Set dKeyFile = AeccApplication.ActiveProject.DescriptionKeyFiles.Item(0)
MsgBox " The Name for the first DescriptionKeyFile in the collection is: " & dKeyFile.Name _
, vbInformation, "Name Example"
End Sub
Sub Example_Name_Drawing()
' This example returns the Name setting for the first Drawing
' in the collection
Dim dwg As AeccDrawing
Set dwg = AeccApplication.ActiveProject.Drawings(0)
MsgBox "The Name for the first Drawing in the collection is: " & dwg.Name _
, vbInformation, "Name Example"
End Sub
Sub Example_Name_FGProfiles()
' This example returns the Name setting of the FGProfile
' for the first alignment in the collection
Dim align As AeccAlignment
Dim FGProfs As AeccFGProfiles
Set align = AeccApplication.ActiveProject.Alignments.Item(0)
Set FGProfs = align.FGProfiles
MsgBox "The Name of the finshed ground profile for the first Alignment is: " & _
FGProfs.Name, vbInformation, "Name Example"
End Sub
Sub Example_Name_Parcel()
' This example starts by creating a Parcel named "NewParcel".
' The new Parcel name displayed. Finally, the new Parcel is renamed
' to "OldName" and is displayed again.
Dim parcels As AeccParcels
Dim parcel As AeccParcel
Set parcels = AeccApplication.ActiveProject.Parcels
' ' Add a new Parcel name "NewParcel"
Set parcel = parcels.Add("NewParcel")
MsgBox "The Parcel name is: " & parcel.Name, vbInformation, "Name Example"
' ' Rename the new Parcel to "OldParcel"
parcels.Rename "NewParcel", "OldParcel"
MsgBox "The Parcel name is: " & parcel.Name, vbInformation, "Name Example"
End Sub
Sub Example_Name_PointFile()
' This example returns the Name setting for the first PointFile
' in the collection.
Dim surf As AeccSurface
Dim pntFile As AeccPointFile
Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
Set pntFile = surf.Inputs.PointFiles.Item(0)
MsgBox "The Name for the first PointFile in the collection is: " & pntFile.Name _
, vbInformation, "Name Example"
End Sub
Sub Example_Name_PointGroup()
' This function gets the Name for the first PointGroup
' in the collection.
Dim pntGrp As AeccPointGroup
Set pntGrp = AeccApplication.ActiveProject.PointGroups.Item(0)
MsgBox "The Name for the first PointGroup is: " & _
pntGrp.Name, vbInformation, "Name Example"
End Sub
Sub Example_Name_PointGroupName()
' This example returns the Name setting for the first PointGroupName
' in the collection.
Dim surf As AeccSurface
Dim pntGrpName As AeccPointGroupName
Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
Set pntGrpName = surf.Inputs.PointGroupNames.Item(0)
MsgBox "The Name for the first PointGroupName in the collection is: " & pntGrpName.Name _
, vbInformation, "Name Example"
End Sub
Sub Example_Name_ProfileBlock()
' This example returns the Name for the first ProfileBlock in the collection
Dim alignProf As AeccProfileBlock
Set alignProf = AeccApplication.ActiveDocument.ProfileBlocks.Item(0)
MsgBox "The Name of the first ProfileBlock in the collection is: " & alignProf.Name, _
vbInformation, "Name Example"
End Sub
Sub Example_Name_Project()
' This example returns the Name setting for the first Project
' in the collection
Dim proj As AeccProject
Set proj = AeccApplication.Projects.Item(0)
MsgBox "The Name value for the first Project in the collection is: " & proj.Name, vbInformation, "Name Example"
End Sub
Sub Example_Name_Prototype()
' This example returns the Name of the first prototype in the collection.
Dim prot As AeccPrototype
Set prot = AeccApplication.Prototypes.Item(0)
MsgBox "The Name of the first prototype in the collection is: " & prot.Name, vbInformation, "Name Example"
End Sub
Sub Example_Name_Surface()
' This example returns the Name of the first surface in the collection.
Dim surf As AeccSurface
Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
MsgBox "The Name of the first surface is: " & surf.Name, vbInformation, "Name Example"
End Sub