Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

System curtain panel face problem

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
390 Views, 2 Replies

System curtain panel face problem

Good day, 

I have faced a serious problem with placing a line based or face based family instance on system panel top face.

Below I added a small snippet from code. Top face is extracted from panel geometry. Every parameter looks fine while debugging (face normal, placement coordinate etc.) but after placing, best case scenario new family instance is flying somewhere in the project or is not placed at all (input line does not belong to face).

This code works like a charm on any other solids like floors, footprintroofs etc.

FamilySymbol profileSymbol = EmacFamilySymbol.GetFamilySymbolByName(doc
, "Roof profile face"
, BuiltInCategory.OST_GenericModel);

using (Transaction trans=new Transaction(doc,"test"))
{
     trans.Start();
     profileSymbol.Activate();
     if (projectedPoints.Count == 2)
     {
          Line projectedLine = Line.CreateBound(projectedPoints.First()
          , projectedPoints.Last());
      XYZ dir = projectedLine.Direction;
      FamilyInstance faceInstance = doc.Create.NewFamilyInstance(topFace
             , projectedLine.Evaluate(0.5, true)
             , new XYZ(1, 0, 0)
             , profileSymbol);
      FamilyInstance lineInstance = doc.Create.NewFamilyInstance(topFace
             , projectedLine
             , profileSymbol);
      }
      trans.Commit();
}

What I want to do is simply to place a family instance on face (line based or face based). For me, it seems that something is wrong with the face of system panel, not sure.

Capture.PNG

Any help or comment is appreciated. I could give a reproducible case if needed

2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

Solved on my own. The problem was in the geometry of the panel I was extracting.

I was using "getInstanceGeometry" instead of "getSymbolGeometry". Instance geometry as written in the article is a copy of geometry and you cannot put anything on these faces. Article below

https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/CloudHelp/cloudhelp/2014/EN...

Message 3 of 3
Ning_Zhou
in reply to: Anonymous

hi MartynasBlinstrubis, how did you get top face of curtain panel?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community