Class holding value of P8 property.
System.Object
Eplan.EplApi.DataModel.PropertyValue
Please note that following code: will create new off-line property and assign it into variable oPV1. If you wish to change value of property use method Eplan::EplApi::DataModel::PropertyValue::Set. PropertyValue object can appear in three states: * Created by user. This object is not connected with any property list or
StorableObject
. It is off-line property. * Collected from property list. It is on-line property. * Collected from any data model object. It is on-line property. In two last cases usage of Eplan::EplApi::DataModel::PropertyValue::Set updates vales in original locations.
PropertyValue oPV1 = oFunction.Properties[Properties.Function.FUNC_COMMENT];
oPV1 = oPV1 + " additional comment";
PropertyValue oOfflineProperty = new PropertyValue();
oOfflineProperty.Set("Setting value to offline PropertyValue.");
FunctionPropertyList oFunctionPropertyList = new FunctionPropertyList();
PropertyValue oOnlineProperty2 = oFunctionPropertyList["EPLAN.Project.UserSupplementaryField1"];
//oFunctionPropertyList["EPLAN.Project.UserSupplementaryField1"] contains empty string
//oOnlineProperty2 contains empty string
oFunctionPropertyList["EPLAN.Project.UserSupplementaryField1"] = "Test_1";
//oOnlineProperty2 == "Test_1 also
oOnlineProperty2.Set("Test_2");
//oFunctionPropertyList["EPLAN.Project.UserSupplementaryField1"] == Test_2 also
PropertyValue oOnlineProperty = m_oTestProject.Properties["EPLAN.Project.UserSupplementaryField1"];
//oProject.Properties.PROJ_CUSTOM_SUPPLEMENTARYFIELD01 contains empty string
m_oTestProject.Properties["EPLAN.Project.UserSupplementaryField1"] = "Test1";
//now oOnlinePropertyValue has value "Test1" also
oOnlineProperty.Set("Test2");
//now oProject.Properties.PROJ_CUSTOM_SUPPLEMENTARYFIELD01 has value "Test2" also
Article article; //a valid article object
//below here PropertyValue is implicit created from int '2' and its assigned to the property list.
article.Properties[Properties.Article.ARTICLE_HEIGHT] = 2;
//below here PropertyValue is implicit created from string "5" and its assigned to the property list.
article.Properties[Properties.Article.ARTICLE_HEIGHT] = "5";
//below here PropertyValue is read form property list and implicit converted to string.
string s = article.Properties[Properties.Article.ARTICLE_HEIGHT];
//below here PropertyValue is read form property list and implicit converted to int.
int i = article.Properties[Properties.Article.ARTICLE_HEIGHT];