Class CustomPropertyMap
A set of custom properties for a member, material, bolt, weld, or other item with custom properties.
Inheritance
Inherited Members
Namespace: DesignData.SDS2.Model
Assembly: DesignData.SDS2.Model.dll
Syntax
public class CustomPropertyMap
Methods
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Finalize()
Declaration
protected void Finalize()
Get(CustomPropertyMapHandle)
Get a CustomPropertyMap object for the handle passed in.
Declaration
public static CustomPropertyMap Get(CustomPropertyMapHandle handle)
Parameters
Type | Name | Description |
---|---|---|
CustomPropertyMapHandle | handle |
Returns
Type | Description |
---|---|
CustomPropertyMap |
Get(String, ref Boolean)
Get the value for the custom property name on this member
Declaration
public bool Get(string name, ref bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Set to the value if it's found, and true is returned. |
System.Boolean | value |
Returns
Type | Description |
---|---|
System.Boolean | true if the value is found and is of the correct type |
Exceptions
Type | Condition |
---|---|
CustomPropertyMissingException | If the custom property is not found in the schema |
CustomPropertyTypeMismatchException | If the custom property is in the schema with a type other than double |
Get(String, ref Double)
Get the value for the custom property name on this member
Declaration
public bool Get(string name, ref double value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Set to the value if it's found, and true is returned. |
System.Double | value |
Returns
Type | Description |
---|---|
System.Boolean | true if the value is found and is of the correct type |
Exceptions
Type | Condition |
---|---|
CustomPropertyMissingException | If the custom property is not found in the schema |
CustomPropertyTypeMismatchException | If the custom property is in the schema with a type other than double |
Get(String, ref Nullable<DateTime>)
Get the value for the custom property name on this member
Declaration
public bool Get(string name, ref DateTime? value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Set to the value if it's found, and true is returned. |
System.Nullable<System.DateTime> | value |
Returns
Type | Description |
---|---|
System.Boolean | true if the value is found and is of the correct type |
Exceptions
Type | Condition |
---|---|
CustomPropertyMissingException | If the custom property is not found in the schema |
CustomPropertyTypeMismatchException | If the custom property is in the schema with a type other than DateTime |
Get(String, ref String)
Lookup the value for the custom property name on this member
Declaration
public bool Get(string name, ref string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Set to the value if it's found, and true is returned. |
System.String | value |
Returns
Type | Description |
---|---|
System.Boolean | true if the value is found and is of the correct type |
Exceptions
Type | Condition |
---|---|
CustomPropertyMissingException | If the custom property is not found in the schema |
CustomPropertyTypeMismatchException | If the custom property is in the schema with a type other than string |
GetPropertyType(String)
Get the type of a value. Which will be None if this does not exist
Declaration
public CustomPropertyValueType GetPropertyType(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
CustomPropertyValueType |
Remarks
For Dimensions this returns Double to maintain compatibility, and reduce unnecessary code. To distinguish between doubles and dimensions look at Setup.CustomPropertySchema, that type will be dimension if it's a dimension.
Set(String, Boolean)
Set the value for the custom property name on this member
Declaration
public bool Set(string name, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Set to the value if it's found, and true is returned. |
System.Boolean | value |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
CustomPropertyMissingException | If the custom property is not found in the schema |
CustomPropertyTypeMismatchException | If the custom property is in the schema with a type other than bool |
NotAddedException | Thrown when setting data on the object without having added it to a transaction |
NotLockedException | Thrown when reading or writing the property of an object that was added to a transaction but is unlocked |
Set(String, Double)
Set the value for the custom property name on this member
Declaration
public bool Set(string name, double value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Set to the value if it's found, and true is returned. |
System.Double | value |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
CustomPropertyMissingException | If the custom property is not found in the schema |
CustomPropertyTypeMismatchException | If the custom property is in the schema with a type other than double |
NotAddedException | Thrown when setting data on the object without having added it to a transaction |
NotLockedException | Thrown when reading or writing the property of an object that was added to a transaction but is unlocked |
Set(String, Nullable<DateTime>)
Set the value for the custom property name on this member
Declaration
public bool Set(string name, DateTime? value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Set to the value if it's found, and true is returned. |
System.Nullable<System.DateTime> | value |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
CustomPropertyMissingException | If the custom property is not found in the schema |
CustomPropertyTypeMismatchException | If the custom property is in the schema with a type other than DateTime |
NotAddedException | Thrown when setting data on the object without having added it to a transaction |
NotLockedException | Thrown when reading or writing the property of an object that was added to a transaction but is unlocked |
Set(String, String)
Set the value for the custom property name on this member
Declaration
public bool Set(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Set to the value if it's found, and true is returned. |
System.String | value |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
CustomPropertyMissingException | If the custom property is not found in the schema |
CustomPropertyTypeMismatchException | If the custom property is in the schema with a type other than string |
NotAddedException | Thrown when setting data on the object without having added it to a transaction |
NotLockedException | Thrown when reading or writing the property of an object that was added to a transaction but is unlocked |