API Help
Eplan.EplApi.MasterData Namespace / MDPartsDatabase Class / GetParts Method / GetParts(MDPartsDatabaseItemPropertyList,MDPartsDatabaseItemPropertyList) Method
Example

In This Topic
    GetParts(MDPartsDatabaseItemPropertyList,MDPartsDatabaseItemPropertyList) Method
    In This Topic
    Gets the specified properties of all filtered parts that are stored in the parts database. With parameter properties you can define the properties you want to 'preload' on query. Use that method when you need only a few properties as read-only values from a lot of articles. When the filter is empty, than all parts are read.
    Syntax
    Remarks
    The parts are sorted by it's part numbers The method speeds up getting masterdata properties except from indexed ones
    Example
    MDPartsDatabaseItemPropertyList filter = new MDPartsDatabaseItemPropertyList();
    MDPartsDatabaseItemPropertyList properties = new MDPartsDatabaseItemPropertyList
    {
        ARTICLE_ERPNR = "-", ARTICLE_PARTNR = "-", ARTICLE_FREE_DATA_VALUE = "-"
    };
    //filter is empty => all parts
    MDPart[] arrParts = m_MDPartsDatabase.GetParts(filter, properties);
    foreach (Eplan.EplApi.MasterData.MDPart oPart in arrParts)
    {
        string strPartNr = oPart.PartNr;
        string erpNum = oPart.Properties.ARTICLE_ERPNR;
    }
    
    
    See Also