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
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.
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 ?
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 ?
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?
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.
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.
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.