Generic Annotation

Generic Annotation

SESE1372
Contributor Contributor
2,121 Views
4 Replies
Message 1 of 5

Generic Annotation

SESE1372
Contributor
Contributor

We use revit 2014.

 

We created a Generic Annotation Family Part that contains a label.

 

The Family Part can be loaded and an instance of it can be created programatically but the placed instance is not visible. The current view is the Floor Plan level 1. The same piece of code loads and places Generic Models without problems. Generic Models are shown, Generic Annotations are not shown.

 

If I place this Generic Annotation Family Part manually, it works fine.

 

Any idea, why programatically the loaded and placed Generic Annotation Family Part is not shown?

 

Thanks

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

Anonymous
Not applicable

I think the problem lies in your code and not the family. So, my guess is that you forgot to commit an transaction or something like that. If your code compiles fine, try to get the elementid after the code has placed the family and see if you can find it in the revit project. Convince yourself it's really loaded and just not shown, or, that it isn't loaded afterall.

 

0 Likes
Message 3 of 5

SESE1372
Contributor
Contributor

Transaction is commited. The instance has a valid id. The annotation is not shown.

I attached a test project to demonstrate the symphtoms.

Extract the zip file to C:\test\annotation. Place the annotation.addin into C:\ProgramData\Autodesk\Revit\Addins\2014.

Create a new project in Revit then Inside Revit on the Add-Ins ribbon tab, click the External Tools drop-down list, then click Annotation.

0 Likes
Message 4 of 5

Anonymous
Not applicable
I have no idea what you are trying to accomplish, so I can't tell if this will help, but if you replace this line of code:

familyInstance = doc.Create.NewFamilyInstance(loc, symbol, Autodesk.Revit.DB.Structure.StructuralType.NonStructural);

with this:

familyInstance = doc.Create.NewFamilyInstance(loc, symbol, doc.ActiveView);

your annotation is clearly visible.
0 Likes
Message 5 of 5

SESE1372
Contributor
Contributor
Accepted solution

Thanks,  peterjegan!

 

it works fine.

0 Likes