PromptForFamilyInstancePlacement problem

bcampbell11
Advocate

PromptForFamilyInstancePlacement problem

bcampbell11
Advocate
Advocate

I am trying to insert a family using the following:

 

uiDoc.PromptForFamilyInstancePlacement(famSym)

 

this works about 85% of the time.  My current problem is that it will work great for the "K-Series Bar Joist-Section.rfa" family for most sizes but not all.  For example the 16K2 produces the attached error, which says "the command to place an instance of this family is disabled".  But why wil it work with most of the other types in the family?

 

Any ideas?

 

Thanks 

0 Likes
Reply
750 Views
4 Replies
Replies (4)

bcampbell11
Advocate
Advocate

by the way, trying to insert the same family via the doc.Create.NewFamilyInstance(Point, famSym, doc.ActiveView) way, it acts like it is placing the 16K2, but then there is nothing actually placed.  Again, most of the other sizes insert just fine.  This is very random and just about all of our families have a couple of "rebel" familysymbols that refuse to work.  I am stuck on this one...

0 Likes

Anonymous
Not applicable

Thats odd and I don't have an answer for you but....

 

Have you tried using

 

ActiveUIDocument.PostRequestForElementTypePlacement(ele)

 

Maybe it mat behave better.

 

Cheers

 

Phillip

0 Likes

bcampbell11
Advocate
Advocate

Phillip,

 

Thanks so much for the reply, but I figured out the problem.  I was failing to consider including the familyname in the program when I inserted the symbol.  So if there was already a symbol with that name but from a different family, it wouldn't work.  So, I guess you could call it a rookie mistake.

 

Thank you!

0 Likes

jeremytammik
Autodesk
Autodesk

Glad to hear you got it sorted. Thank you for letting us know!

 

I closed the automatically generated ADN case 10870393 [PromptForFamilyInstancePlacement problem] for you.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes