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: 

Invalid face References after Regenerate.

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
321 Views, 2 Replies

Invalid face References after Regenerate.

Has anyone else had the problem where a valid PlanarFace of a wall becomes unusable for family creation after calling Document.Regenerate () within a dynamic updater. If I pass in a reference to the face while creating a line-based family i get an error that says the instance can't be created on this face. If i just pass in the face itself i get a message saying that the geometry object doesn't contain a reference and that i should set compute references when extracting faces from an element. The thing is, i did use compute references and have what look to be valid references. I even tried creating a stable reference string before calling regenerate and then parse the stable reference string to recreate the reference after the regen then pass that into the creation method and still get the same error. If i remove the regen call the problem goes away.
2 REPLIES 2
Message 2 of 3
jeremytammik
in reply to: Anonymous

Dear Scott,

 

I repeat my answer that I just provided to your later thread Re: API bug in Document.Regenerate:

 

http://forums.autodesk.com/t5/revit-api/api-bug-in-document-regenerate/td-p/5911198

 

I do not believe this is a bug.

 

This is simply a proof that you cannot store a PlanarFace.

 

How do you want to achieve that?

 

It is not possible.

 

Revit geometry is read-only, and represents a view of the parametric BIM, a momentary snapshot.

 

As soon as you add something to the wall, e.g. the family instances you mention, the wall is affected.

 

Regenerate creates a new snapshot of the current situation, and the planar face that you previously "stored" (I wish I had triple double quotes here) is in blissful oblivion.

 

I hope this clarifies.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3
jeremytammik
in reply to: Anonymous

Dear Scott,

 

Thank you for your understanding and hope that the further testing will clarify more.

 

Meanwhile, I published the currrent state of affairs on The Building Coder:

 

http://thebuildingcoder.typepad.com/blog/2015/11/connecting-desktop-and-cloud-at-au-and-devdays.html

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community