Invalid face References after Regenerate.

Invalid face References after Regenerate.

Anonymous
Not applicable
546 Views
2 Replies
Message 1 of 3

Invalid face References after Regenerate.

Anonymous
Not applicable
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.
0 Likes
547 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk

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

0 Likes
Message 3 of 3

jeremytammik
Autodesk
Autodesk

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

0 Likes