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: 

Problem wirh FaceWall.Create

1 REPLY 1
Reply
Message 1 of 2
AndrewButenko
302 Views, 1 Reply

Problem wirh FaceWall.Create

Hello! I have problem to create facewall. 

When I do 

 

 FaceWall.Create(document, t, WallLocationLine.CoreExterior, f.Reference)

 

then process of work continue, but never finish. I think it happened because my reference is incorrect.

I take reference from geometry 

 

Dim op As New Options
op.ComputeReferences = True
op.IncludeNonVisibleObjects = True

Dim ge As GeometryElement = Instance.Geometry(op)
For Each sol In ge.ToList()
If sol.GetType Is GetType(Solid) Then
Dim s As Solid = sol

Dim f As Face = s.Faces(0)

 

In reference which I have  (f.Reference ) GlobalPoints=nothing. 

 

When I take reference in other way

Dim r as reference= uidoc.Selection.PickObject(Selection.ObjectType.Element)

GlobalPoints is not nothing and all work. How can I get reference with GlobalPoints<>nothing but without PickObject?

 

1 REPLY 1
Message 2 of 2
RPTHOMAS108
in reply to: AndrewButenko

From RevitAPI.chm:

 

"Reference.GlobalPoint Property
The position on which the reference is hit. "

 

i.e. if you've picked it the global point is the point at which you picked it. If you have retrieved it from element geometry then you've not picked it so has no GlobalPoint property set.

 

I assume you are picking the face of a mass and not just any face. Check FaceWall.IsValidReferenceForFaceWall.

 

"The reference must represent a face of a massing instance, and must be planar, and its normal must not be vertical or horizontal."

 

Last part is a bit confusing because if the normal is horizontal then the wall would be vertical and you can create those in the UI. I assume they mean ...(face not horizontal).

 

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

Post to forums  

Autodesk Design & Make Report