ProfileCreateByLayout(String, ObjectId, ObjectId, ObjectId, ObjectId) Method |
Creates a profile of FG type.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntaxpublic static ObjectId CreateByLayout(
string profileName,
ObjectId alignmentId,
ObjectId layerId,
ObjectId styleId,
ObjectId labelSetId
)
Public Shared Function CreateByLayout (
profileName As String,
alignmentId As ObjectId,
layerId As ObjectId,
styleId As ObjectId,
labelSetId As ObjectId
) As ObjectId
public:
static ObjectId CreateByLayout(
String^ profileName,
ObjectId alignmentId,
ObjectId layerId,
ObjectId styleId,
ObjectId labelSetId
)
Parameters
- profileName String
- Name for the new profile, make sure this name is not used by another profile under the specified alignment
- alignmentId ObjectId
- Alignment id to place the new profile, OBJECTID TYPE: Autodesk.Civil.DatabaseServices.Alignment
- layerId ObjectId
- Layer id to place the new profile, OBJECTID TYPE: Autodesk.AutoCAD.DatabaseServices.LayerTableRecord
- styleId ObjectId
- Style id to apply to the new profile, OBJECTID TYPE: Autodesk.Civil.DatabaseServices.Styles.AlignmentStyle
- labelSetId ObjectId
- LabelSet id to apply to the new profile, OBJECTID TYPE: Autodesk.Civil.DatabaseServices.Styles.AlignmentLabelSetStyle
Return Value
ObjectId
ExceptionsException | Condition |
---|
ArgumentException |
Thrown when:
- profileName is either null, blank, or existed under the specified alignment.
- alignmentId, layerId, styleId, or labelsetId is invalid.
|
Remarks
OBJECTID TYPE: Autodesk.Civil.DatabaseServices.Profile
Example 1Alignment oAlignment = ts.GetObject(alignID, OpenMode.ForRead) as Alignment;
2
3
4ObjectId layerId = oAlignment.LayerId;
5
6
7ObjectId styleId = doc.Styles.ProfileStyles["Standard"];
8ObjectId labelSetId = doc.Styles.LabelSetStyles.ProfileLabelSetStyles["Standard"];
9
10ObjectId oProfileId = Profile.CreateByLayout("My Profile", alignID, layerId, styleId, labelSetId);
See Also