System.Object
Eplan.EplApi.MasterData.MDPropertyValue
System.Object
Eplan.EplApi.MasterData.MDPropertyValue
[DefaultMember("Item")] public sealed class MDPropertyValue
[DefaultMember("Item")] public ref class MDPropertyValue sealed
MDPropertyValue object can be in one of three states: * Created by user. This object is not connected with any property list or object stored in master data database
. It is and off-line property. * Collected from property list. It is an on-line property. * Collected from any master data object. It is an on-line property. In two last cases overloads of the PropertyValue::Set
method: Eplan::EplApi::MDPropertyValue:, Eplan::EplApi::MDPropertyValue:, Eplan::EplApi::MDPropertyValue::Set(System: etc, are setting values in original locations.
PropertyValue::Set
method: Eplan::EplApi::MDPropertyValue:, Eplan::EplApi::MDPropertyValue:, Eplan::EplApi::MDPropertyValue::Set(System: etc.MDPropertyValue oPv = oPart.Properties[Properties.MDPartsDatabaseItem.ARTICLE_DESCR1]; oPv = oPv + " additional comment"; //will create new off-line property value object and assign it into variable oPv.
MDPart oPart = m_MDPartsDatabase.Parts[0]; //a valid master data part object //here MDPropertyValue is implicit created from int constant ('5') and it is assigned to the property list. oPart.Properties[Eplan.EplApi.MasterData.Properties.MDPartsDatabaseItem.ARTICLE_HEIGHT] = 5; //here MDPropertyValue is implicit created from string constant ("7") and it is assigned to the property list. oPart.Properties[Eplan.EplApi.MasterData.Properties.MDPartsDatabaseItem.ARTICLE_HEIGHT] = "7"; //here MDPropertyValue is read form property list and implicit converted to string. string s = oPart.Properties[Eplan.EplApi.MasterData.Properties.MDPartsDatabaseItem.ARTICLE_HEIGHT]; //here MDPropertyValue is read form property list and implicit converted to int. int i = oPart.Properties[Eplan.EplApi.MasterData.Properties.MDPartsDatabaseItem.ARTICLE_HEIGHT];
Name | Description | |
---|---|---|
MDPropertyValue Constructor | Default constructor. Creates a MDPropertyValue object. |
Name | Description | |
---|---|---|
Definition | Returns an object that provides information about the property and its definition. The information includes: name of the property, it's data type, whether it is indexed or not, whether it is read-only, upper/lower bounds of values for numerical properties. | |
Id | Returns P8-Property descriptor ( id and index ) of the object. Off-line MDPropertyValue objects don't have descriptors because they point to value directly. off-line MDPropertyValue is created by operators that take base types values. | |
Indexes | Returns array of indexes for which property value is not empty. It can be used with MDPropertyValue::operator []; | |
IsEmpty | Checks if property value is empty. If its not it can be read. IMPORTANT: If property is indexed you have to specify index. | |
Item | Returns MDPropertyValue object at specified index. | |
LastUsedIndex | Returns number of highest used index. Index value starts from 1. If it is not indexed-property or there index is not used, LastUsedIndex is 0; Object of MDPropertyValue have to point to on-line property. | |
Parent | Property list to which this property value is connected. |
Name | Description | |
---|---|---|
Dispose | Destructor for deterministic finalization of MDPropertyValue object. | |
GetDisplayString | Display value of property as Eplan.EplApi.Base.MultiLangString. | |
Set | Overloaded. Sets System.DateTime value in MDPropertyValue object. | |
ToBool | Converts this MDPropertyValue object to System::Boolean . | |
ToDouble | Converts this MDPropertyValue object to doule . | |
ToInt | Converts this MDPropertyValue object to long . | |
ToMultiLangString | Converts this MDPropertyValue object to Eplan.EplApi.Base.MultiLangString. | |
ToPointD | Conversion this MDPropertyValue object to Eplan.EplApi.Base.PointD. | |
ToString | Overloaded. Returns string value of this property. When type of property is MultiLangString then only specified language is returned. In case of off-line MDPropertyValue object, stored value is returned without any cast. When property can not be read, default_value is returned instead of throwing MDEmptyPropertyException . | |
ToTime | Converts this MDPropertyValue object to System::DateTime . |
Implicit Type Conversion | Overloaded. Converts MDPropertyValue object to long . |