How to add shared parameter to imported dwg in generic model famliy

How to add shared parameter to imported dwg in generic model famliy

Anonymous
Not applicable
2,372 Views
4 Replies
Message 1 of 5

How to add shared parameter to imported dwg in generic model famliy

Anonymous
Not applicable

Hi,

 

We are looking for a solution to import Inventor assemblies to Revit.

We want to annotate and schedule the parts in Revit from Inventor assemblies. 

 

Now we're importing iam-file (Inventor) in Autocad, via the import command, and save it as a dwg-file.

And then we import this dwg-file to Revit in a generic model family. This generic model family used in a project.

 

Is there a way to add shared parameters to the imported instances/symbols in the Revit family?

Maybe via macros/add-in?

 

Thanks in advance!

Lien

0 Likes
Accepted solutions (1)
2,373 Views
4 Replies
Replies (4)
Message 2 of 5

RPTHOMAS108
Mentor
Mentor

You can't add parameters to a DWG instance in a family but you can add parameters to a family within a family containing the DWG instance i.e. a nested family that is shared.

 

You add the parameters to the family document using Document.FamilyManager.AddParameter

 

To add a Parameter to a family via the API you first need to make a family type and set it current:

(FamilyManager.MakeType then FamilyManager.CurrentType =...)

 

Message 3 of 5

Anonymous
Not applicable

Thanks for your reply!

So, there is no other way to do this besides rebuilding the assembly in Revit?

 

Is there code available concerning this topic?

0 Likes
Message 4 of 5

RPTHOMAS108
Mentor
Mentor
Accepted solution

I'm not familiar with Inventor so I can't comment on your workflow. There might be something on the exchange app site allowing a more direct path.

 

There will not be specific examples for this. I can only note below where to look in the RevitAPI.chm and certain aspects where a greater understanding is required (such as obtaining the built in parameter FAMILY_SHARED).

 

In addition to the FamilyManager methods for dealing with parameters and types you'll have to become familiar with:

Document.Import & DWGImportOptions

Document.LoadFamily

Document.Create.NewFamilyInstance (overloads)

 

The parameter named 'Shared' (FAMILY_SHARED) is attached to an object type of Family in the Family document. This Family is distinguished from the others by it's property value  IsOwnerFamily = True 

0 Likes
Message 5 of 5

Anonymous
Not applicable

Thank you for the information!

0 Likes