AnsweredAssumed Answered

API: Method "Getvar" of a IEdmBomCell object of a derived BOM

Question asked by Giuseppe Ceccherini on May 10, 2012
Latest reply on May 16, 2012 by Jim Sculley

Hi all,

i'm using Enterprise PDM 2011 sp5.

I noticed that the method GetVar of a IEdmBomCell of a derived Bom (that is from "GetDerivedBOMs" method) return always an empty string.

that is a real big problem to me.

anybody knows if this is a bug?

 

at the bottom the code (c#) where i try to read a derived BOM. thanks in advance.

 

string _bomName = "A1.SLDASM.1.BOM";

                EdmBomView _bomView;

                Array _boms;

                m_File.GetDerivedBOMs(out _boms);

                if (_boms.Length > 0)

                {

                    foreach (EdmBomInfo _bomInfo in _boms)

                    {                       

                        EdmBom _bom = (EdmBom)m_Vault.GetObject(EdmObjectType.EdmObject_BOM, _bomInfo.mlBomID);

                        if (_bomName.ToUpper() == _bom.Name.ToUpper())

                        {

                            _bomView = _bom.GetView(_bom.CurrentVersion); ;

                            Array _rows;

                            _bomView.GetRows(out _rows);

                            if (_rows.Length > 0)

                            {

                                Array _columns;

                                _bomView.GetColumns(out _columns);

                                foreach (IEdmBomCell _cell in _rows)

                                {

                                    foreach (EdmBomColumn _col in _columns)

                                    {

                                        object _poValueObj; object _poComputedValueObj; string _conf; bool _ro;

                                        _cell.GetVar(_col.mlVariableID, _col.meType, out _poValueObj, out _poComputedValueObj, out _conf, out _ro);

                                    }                                                                       

                                }

                            }

                        }

                    }

                }

Outcomes