Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

How to get tag geometry information from Revit

8 ANTWORTEN 8
Antworten
Nachricht 1 von 9
ritesh.solankeSKPPH
568 Aufrufe, 8 Antworten

How to get tag geometry information from Revit

 

I am Parsing the 2D geometry of Revit I am able to get the 2D geometry. But unable to get geometry information. Can you suggest the API which will give me the tag and dimension information from Revit.  I have attached the snapshot of image.

 

Thanks,

Ritesh

8 ANTWORTEN 8
Nachricht 2 von 9

Nothing attached.But I'm wondering way a middle-man is needed here. Seems to me that all this could be accomplished directly within Revit. No API. 

Nachricht 3 von 9

tag_annotation.PNG

Nachricht 4 von 9

we are trying with

IndependentTag tag = currentViewdoc.GetElement(elem.Id) as IndependentTag;

but this we will get only TagHeadPosition , how to get other point data ?

Nachricht 5 von 9

It found that each tag is Revit family file and the model lines are associated with the tag symbol. Can you explain how to get the geometry from it ?

Nachricht 6 von 9
RobDraw
als Antwort auf: ritesh.solankeSKPPH

You keep saying "tag the geometry information". That is confusing from a Revit point of view. Geometry information is usually dimensioned. The image that you posted shows a tag that uses either element or type information.

 

Can you be more specific about what you are trying to accomplish along with screen shots?


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
Nachricht 7 von 9
loboarch
als Antwort auf: ritesh.solankeSKPPH

I am not sure what it is you are trying to do exactly and for sure I am NOT an API guy.

 

I think what you are getting is what Revit "knows" about the tag in the project environment. It knows the position of the tag and describes it as a point TagHeadPosition.  The rest of the geometry of the tag is controlled by the family definition.

 

So you are getting the position of the insertion of the family basically, and then Revit looks to the family definition to draw the rest of the geometry of the tag.  So really in the Revit project data structure there is the position and a pointer to the family reference. At least that is how I think it works as a non API type of guy and limited understanding of actual coding of things.



Jeff Hanson
Principal Content Experience Designer
Revit Help |
Nachricht 8 von 9
ritesh.solankeSKPPH
als Antwort auf: RobDraw

I am reading the Revit file using SDK and creating the SVG file . In order to create the SVG geometry we need the geometry information of Tag from SDK.  

Nachricht 9 von 9
ritesh.solankeSKPPH
als Antwort auf: loboarch

ElementClassFilter elementFilter = new ElementClassFilter(typeof(IndependentTag));
							FilteredElementCollector coll = new FilteredElementCollector(currentViewdoc, iCurrentView.Id);
							coll.WherePasses(elementFilter);

							List<IndependentTag> TtagLijst = coll.OfType<IndependentTag>().ToList();

							foreach (IndependentTag it in TtagLijst)

							{
								ElementType elt = currentViewdoc.GetElement(it.GetTypeId()) as ElementType;
														FamilySymbol fi1 = currentViewdoc.GetElement(elt.Id) as FamilySymbol;
}

Here I tried with sample code where I am able to get the  FamilySymbol from the tag, but how to get the  GeometryElement from FamilySymbol 

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report