1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Automation API - Saving Empty Part

Discussion in 'Add-on Development' started by eNystrom, Dec 4, 2018.

  1. eNystrom

    eNystrom New Member

    I am trying to create and new part using the automation API.

    I can create an IADPartSession successfully using the following code.

    VARIANT_BOOL sheetMetal = 0;
    _bstr_t part = _bstr_t("test.AD_PRT");
    IADPartSession *session = m_pRoot->CreateEmptyPart(part, sheetMetal);

    The documentation for IADPartSession shows the Save and Close methods are inherited from IADSession. When I try to call these methods, I get a compile error.

    Is this the correct approach for creating a new part?

Share This Page