API Help
Eplan.EplApi.DataModel Namespace / PropertyValue Class / Id Property
Example

In This Topic
    Id Property (PropertyValue)
    In This Topic
    Returns P8-Property descriptor ( id and index ) on which points object. Transient PropertyValue objects don't have descriptors because they points directly to value. Transient PropertyValue is created operator by operators which takes base types values.
    Syntax
    public AnyPropertyId Id {get;}
    public:
    property AnyPropertyId^ Id {
       AnyPropertyId^ get();
    }
    Exceptions
    ExceptionDescription
    Thrown when object is in transient mode (isn't pointed to PropertyList ).
    Example
    PropertyValue pV = "123";	// Transient objects
    PropertyValue pV2= 12;		// also transient
    
    PropertyValue pV3 = same_project.Pages[0].Functions[0].Properties[ SAME_PROPERTY /* property id */ ];
    	pV3.Id == new AnyPropertyId ( SAME_PROPERTY );
    // In this case, where index wasn't specified, pV3.Id.Index is 0.
    
    PropertyValue pV4 = same_project.Pages[0].Functions[0].Properties[ SAME_PROPERTY /* property id */ , 12  /* property index */ ];
    	pV4.Id == new AnyPropertyId ( SAME_PROPERTY , 12 );
    	int propertyId = pV4.Id.AsInt();
    	int propertyIndex = pV4.Id.Index;
    See Also