AssetPropertyAddConnectedAsset Method |
Adds a new connected asset attached to this asset property, if it allows it.
Namespace: Autodesk.Revit.DB.VisualAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic void AddConnectedAsset(
string schema
)
Public Sub AddConnectedAsset (
schema As String
)
public:
void AddConnectedAsset(
String^ schema
)
member AddConnectedAsset :
schema : string -> unit
Parameters
- schema String
-
The schema name.
ExceptionsException | Condition |
---|
ArgumentException |
The schema name is not valid.
|
ArgumentNullException |
A non-optional argument was null
|
InvalidOperationException |
The asset property is not editable.
-or-
Cannot check validity for a property not being edited in AppearanceAssetEditScope.
-or-
Asset property is already connected to one asset.
|
Remarks
Cannot add a connected asset if one is already connected.
Use RemoveConnectedAsset() to avoid an exception being thrown.
A new preset asset is created and connected to the property.
For "UnifiedBitmap", it contains an empty property unifiedbitmap_Bitmap.
See Also