Error With New API Schema Revit

Error With New API Schema Revit

Chuong.Ho
Advocate Advocate
722 Views
3 Replies
Message 1 of 4

Error With New API Schema Revit

Chuong.Ho
Advocate
Advocate

Hi Developer,

Although new schema delete API has been replaced, but I can't use this new API for Revit 2022, is there anything wrong? when i use the old function Schema.EraseSchemaAndAllEntities(item.Schema, true), everything works

 

#if REVIT_2018 || REVIT_2019 || REVIT_2020 || REVIT_2021 || REVIT_2022
Schema.EraseSchemaAndAllEntities(item.Schema, true);
#else
DB.Doc.EraseSchemaAndAllEntities(item.Schema);
#endif

Chuong Ho

EESignature

0 Likes
Accepted solutions (1)
723 Views
3 Replies
Replies (3)
Message 2 of 4

RPTHOMAS108
Mentor
Mentor
Accepted solution
Message 3 of 4

jeremy_tammik
Alumni
Alumni

Happy New Year to you both and many thanks to Richard for pointing out the existing thread raising a similar issue. Let's continue discussing the problem there.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 4 of 4

Chuong.Ho
Advocate
Advocate

Thanks so much, I will follow topic it, Happy New Year.

Chuong Ho

EESignature

0 Likes