Creates a profile of FG type.
public 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 )
| Exception | Condition |
|---|---|
| ArgumentException |
Thrown when:
|
1Alignment oAlignment = ts.GetObject(alignID, OpenMode.ForRead) as Alignment; 2 3// use the same layer as the alignment 4ObjectId layerId = oAlignment.LayerId; 5// get the standard style and label set 6// these calls will fail on templates without a style named "Standard" 7ObjectId styleId = doc.Styles.ProfileStyles["Standard"]; 8ObjectId labelSetId = doc.Styles.LabelSetStyles.ProfileLabelSetStyles["Standard"]; 9 10ObjectId oProfileId = Profile.CreateByLayout("My Profile", alignID, layerId, styleId, labelSetId);