Create New Union Fitting

Create New Union Fitting

RickyBell
Enthusiast Enthusiast
2,053 Views
2 Replies
Message 1 of 3

Create New Union Fitting

RickyBell
Enthusiast
Enthusiast

I have a method which draws two pieces of pipe and puts a union fitting in between.

 

My problem is that the union fitting, while retaining it's connection, is showing up as the wrong size.  (ex.  12" fitting on a 6" pipe)

 

The family I'm using is a custom family which uses a lookup table for dimensional data.  There is only one type in this family.  The lookup table drives off the "Diameter" parameter.  If I try setting the "Diameter" parameter after the family is placed, it returns a "read only" message.

 

I've tried duplicating the family type, changing the size, and placing the family instance but that is not the ideal outcome.  I'd rather not have multiple types for a family using a lookup table.

 

Any help is appreciated!

0 Likes
2,054 Views
2 Replies
Replies (2)
Message 2 of 3

RickyBell
Enthusiast
Enthusiast

After more playing around, I'm still nowhere.  Here is the method I use to create the Union Connection.

 

FamilyInstance newFitting = doc.Create.NewUnionFitting(unionCon1, unionCon2);

 

It creates the union with connections.  But the variable 'newFitting' always comes back as null.  Has the fitting not yet been created?  

 

doc.regenerate() doesn't help.

 

Thanks!

0 Likes
Message 3 of 3

RickyBell
Enthusiast
Enthusiast

*UPDATE - I've been able to get the Id's of the elements that need to be changed.  So, I guess the question is now:  

 

How do you change the size of a parametric family through the API?

 

Thanks.

0 Likes