ChannelCreateFromFeatureLine(String, ObjectId) Method |
Create channel from feature line.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDrainageDesignMgd (in AeccDrainageDesignMgd.dll) Version: 13.9.960.0
Syntaxpublic static ObjectId CreateFromFeatureLine(
string channelName,
ObjectId featureLineId
)
Public Shared Function CreateFromFeatureLine (
channelName As String,
featureLineId As ObjectId
) As ObjectId
public:
static ObjectId CreateFromFeatureLine(
String^ channelName,
ObjectId featureLineId
)
Parameters
- channelName String
- Name of the channel to be created.
- featureLineId ObjectId
- Object id of the feature line used to create channel.
Return Value
ObjectIdObject id of the channel created.
Exceptions| Exception | Condition |
|---|
| BackwardCompatibilityException |
Thrown when getting/setting value and data is not compatible with the current version of the channel. Try to fix by upgrading the channel.
|
| ForwardCompatibilityException |
Thrown when getting/setting value and data is not compatible with the current version of the channel. Try to fix by opening the drawing in a newer version of the product.
|
| ArgumentException |
Thrown when:
- Channel name is empty.
- Channel name is duplicate.
- Channel name contains invalid character.
- Feature line object id is invalid.
|
| ArgumentNullException |
Thrown when the specified channel name string is null.
|
Example
This example shows how to create a channel from a feature line.
1ObjectId featureLineId = CivilDocument.GetCivilDocument(m_Database).GetSitelessFeatureLineIds()[0];
2
3ObjectId channelId = Channel.CreateFromFeatureLine("channel name", featureLineId);
See Also