I'm using this to turn off design history for the model I create, then set it back to what it was before:
// get the current default design type
DefaultDesignTypeOptions currentDefaultDesignType = DefaultDesignTypeOptions::ParametricDesignTypeOption;
Ptr<ProductPreferencesCollection> prdPrefs;
Ptr<FusionProductPreferences> fpp;
Ptr<Preferences> prefs = fusionApp->preferences();
if (prefs)
{
prdPrefs = prefs->productPreferences();
}
if (prdPrefs)
{
Ptr<ProductPreferences> designPrefs = prdPrefs->itemByName("Design");
fpp = designPrefs;
if (fpp)
{
currentDefaultDesignType = fpp->defaultDesignType();
}
// now set to direct modeling so we DO NOT CAPTURE DESIGN HISTORY
fpp->defaultDesignType(DefaultDesignTypeOptions::DirectDesignTypeOption);
// TESTING set to parametric modeling to see if things act different
//fpp->defaultDesignType(DefaultDesignTypeOptions::ParametricDesignTypeOption);
}
// create a new document
m_pNewDoc = fusionApp->documents()->add( DocumentTypes::FusionDesignDocumentType, true, NULL );
// set it back to what it was before
fpp->defaultDesignType(currentDefaultDesignType);
Matt Wynn
Senior Manager, Software Development, Fusion Fabrication