Reply

How to Get all the variables available in the variable table (variables + dimensions) in C++

[ Edited ]

 

Hi Jason,

How to Get all the variables in the variable table (variables + dimensions) in C++ for part document...

I am not getting all the variables ... please let me know...

//Here is my code

 

  VariablesPtr PtrAllVar;

  PtrAllVar = pPartDoc->GetVariables();

   long count = PtrAllVar->Count; 

 // i am not getting all the variables count

 

   for(long i=1;i

   {

 

    try{

 

     variablePtr pVar = PtrAllVar->Item(i); 

 

     _bstr_t PrmName = pVar->GetName();

 

     double dValue =   pVar->GetValue();

 

     _bstr_t bFormula = pVar->GetFormula();

    }

    catch(...)

    {

    }

   }

 

Thanks

 

 

 

Posted by: Triad User
Post date: 5/4/2009 1:07:06 AM

3 REPLIES

RE: How to Get all the variables available in the variable table (variables + dimensions) in C++

[ Edited ]

 

ActiveDocument -> PMI -> Dimensions

Dimension->Value

Dimension->VariableTableName

Note that the value is stored in Metric and converted in the GUI depending on your settings.

BTW, I found this using my free Solid Edge Spy application.  If you do not have it, I suggest you download and install it.  It will help you find these types of things easily.

 

Posted by: Jason Newell
Post date: 5/4/2009 7:49:02 AM

RE: How to Get all the variables available in the variable table (variables + dimensions) in C++

[ Edited ]

 

Hi Jason,

  I am thankful to u, Please let me know how to download free Solid Edge Spy application.

thanks

 

Posted by: Triad User
Post date: 5/4/2009 6:05:47 PM

RE: How to Get all the variables available in the variable table (variables + dimensions) in C++

[ Edited ]

The menu at the top of the page. Products -> Solid Edge Spy

 

Thanks,

 

 

Posted by: Jason Newell
Post date: 5/4/2009 6:39:24 PM