Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Deleting sharted parameters in manufacturer family cant delete error

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
frankholidayjunior
717 Views, 3 Replies

Deleting sharted parameters in manufacturer family cant delete error

In the age of too much of everything I dearly like to score more hits then misses with my manufacturer family de-cluttering.  I am getting every second family from the same US imperial WALDO 2012 kitchen families and updating to 2019 returning an elementid cannott be deleted. So I am getting the shared parameters within the family like thus...

ElementsToDelete.Add(_doc.FamilyManager.get_Parameter(strDefName).Id);

 

then deleting using the standard...

 

foreach (ElementId id in ElementsToDelete)
{
try
{
using (Transaction trans = new Transaction(_doc, "Delete Manufacturer's Bloat"))
{
trans.Start();
_doc.Delete(id);

 

is there a way of checking if the id can be deleted?

Also it seems that none of the shared aprameters can be deleted in one of the waldo families and then all can be in the next and they are all 2012 families resurrected from their american crypts. (using heaps of dimensions not to reference planes). 

3 REPLIES 3
Message 2 of 4

Why not use FamilyManager.RemoveParameter(FamilyParameter familyParameter)?


Hitting Accepted Answer is a Community Contribution from me as well as from you.
======================================================================
Message 3 of 4

hi,

I wasn't aware of the methods existence. Also these are shared parameters inside of the family document, though I a guessing this doesn't matter. I will let you know how i go.

Message 4 of 4

hi, this worked perfect, a warning swallower for the poorly made manufacturer families with non reference plane associated dimensions is also a great idea. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report