Reply

SE API with C++/Units of Measure

[ Edited ]

 

    SolidEdgeFramework::ApplicationPtr pSEApp;

    SolidEdgeFramework:Smiley FrustratedolidEdgeDocumentPtr pDoc;

    SolidEdgeFramework::UnitsOfMeasurePtr pUOM;

    IDispatchPtr pDispatch;

    HRESULT hr;

    hr=pSEApp.GetActiveObject("SolidEdge.Application");

    pDispatch=pSEApp->GetActiveDocument();

    hr=pDispatch->QueryInterface(&pDoc);

    DoDataExchange(TRUE);

    pUOM=pDoc->UnitsOfMeasure;

    _variant_t x;

    x=pUOM->ParseUnit((int)UnitTypeConstants::igUnitDistance,(_bstr_t)m_ParseSourceStr);

    m_ParseResult=x;

    DoDataExchange(FALSE);

 

    SolidEdgeFramework::UnitOfMeasurePtr pUnit;

 

    pUnit=pUOM->Item((long)1);

// dialog with WTL

 

Posted by: assassin 007
Post date: 5/16/2010 7:40:14 PM