2 Replies Latest reply on Feb 3, 2009 11:24 AM by Christina Seay

    PDM 2009 - Get Individual Bom Columns...?

    Christina Seay
      I know I'm probably looking right at the answer to this in the API help file, but...

      I have a datagrid view that I'm populating with BOM information. My file has about 20 BOM columns, but I'd like to only display 10 of those in the datagrid.

      Does anyone know how to retrieve an individual BOM Column for a file?
        • PDM 2009 - Get Individual Bom Columns...?
          You need to loop through the array that is returned from GetColumns() looking for the caption (as long as it is unique) and then take note of the variable ID of the column. You'd then call GetRows(), and now that you have an array of IEdmBomCell interfaces, you'll be able to call GetVar() on each one passing in the variable ID you retrieved earlier. In this case, I would probably store the variable Id's in a List<int>.<br /><br />From what I can see the API does not expose a method to directly retrieve a column value. However, that doesn't mean one couldn't write something. <img class="jive_macro jive_emote" src="http://solidworks-main.hosted.jivesoftware.com/images/emoticons/happy.gif" jivemacro="emoticon" ___jive_emoticon_name="happy" />