Message 1 of 9

Not applicable
03-02-2018
10:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a protocol to place shared parameters on a variety of Element types, including FabricationParts:
string sDataDirectory = AppDomain.CurrentDomain.GetData("DataDirectory") as string; pApp.SharedParametersFilename = sDataDirectory + @"/MyPlugin_SharedParameters.txt"; var pParams = pApp.OpenSharedParameterFile(); // Pipes var pPipeGroup = pParams.Groups.get_Item("Pipe"); var pPipeCategory = pApp.Create.NewCategorySet(); pPipeCategory.Insert(pDoc.Settings.Categories.get_Item(BuiltInCategory.OST_PipeCurves)); pPipeCategory.Insert(pDoc.Settings.Categories.get_Item(BuiltInCategory.OST_FlexPipeCurves)); #if !RV2016 pPipeCategory.Insert(pDoc.Settings.Categories.get_Item(BuiltInCategory.OST_FabricationPipework)); #endif var iPipeBinding = pApp.Create.NewInstanceBinding(pPipeCategory); using (Transaction pTrans = new Transaction(pDoc, "Set Parameters")) { pTrans.Start(); foreach (var pDef in pFabProGroup.Definitions) pDoc.ParameterBindings.Insert(pDef, iFPBinding, BuiltInParameterGroup.PG_IDENTITY_DATA); pTrans.Commit(); }
My testing model using FabricationParts of the type FabricationPipework will apply other parameters to other Categories, but not the FabricationPipework... Any ideas?
Solved! Go to Solution.