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: 

how to Purge unused materials

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
dhanait_ajay13
924 Views, 10 Replies

how to Purge unused materials

dhanait_ajay13
Enthusiast
Enthusiast

How to Purge Unused Materials?

I use Performance Adviser for purging but performance adviser  doesn't get unused materials.

 

0 Likes

how to Purge unused materials

How to Purge Unused Materials?

I use Performance Adviser for purging but performance adviser  doesn't get unused materials.

 

10 REPLIES 10
Message 2 of 11

naveen.kumar.t
Autodesk Support
Autodesk Support
Accepted solution

Hi @dhanait_ajay13 ,

 

Could you please try using the steps mentioned in the below link?

https://boostyourbim.wordpress.com/2016/10/21/purge-unused-materials-for-another-rtceur-api-wish/ 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes

Hi @dhanait_ajay13 ,

 

Could you please try using the steps mentioned in the below link?

https://boostyourbim.wordpress.com/2016/10/21/purge-unused-materials-for-another-rtceur-api-wish/ 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 3 of 11

dhanait_ajay13
Enthusiast
Enthusiast

@naveen.kumar.t  Thank you

0 Likes

@naveen.kumar.t  Thank you

Message 4 of 11

dhanait_ajay13
Enthusiast
Enthusiast

but unused imported categories still remain exist

0 Likes

but unused imported categories still remain exist

Message 5 of 11

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @dhanait_ajay13 ,

 

Could you please provide some more information?
Can you explain your issue using screenshots?


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes

Hi @dhanait_ajay13 ,

 

Could you please provide some more information?
Can you explain your issue using screenshots?


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 6 of 11

dhanait_ajay13
Enthusiast
Enthusiast

dhanaitajay13_0-1660902642082.png

not able to detect this imported categories

0 Likes

dhanaitajay13_0-1660902642082.png

not able to detect this imported categories

Message 7 of 11

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @dhanait_ajay13 ,

 

Thanks for the screenshots.
Are you able to remove these imported categories in the Revit UI (without using the API) without any problems?
What steps did you follow?
I am checking with the Revit Engineering team for you.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes

Hi @dhanait_ajay13 ,

 

Thanks for the screenshots.
Are you able to remove these imported categories in the Revit UI (without using the API) without any problems?
What steps did you follow?
I am checking with the Revit Engineering team for you.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 8 of 11

dhanait_ajay13
Enthusiast
Enthusiast

yes i am able to remove these imported categories in the Revit UI (without using the API) without any problems
Simply click on Purge menu button 2-3 times it remove all unuse items

but using API i am not able remove this

yes i am able to remove these imported categories in the Revit UI (without using the API) without any problems
Simply click on Purge menu button 2-3 times it remove all unuse items

but using API i am not able remove this

Message 9 of 11

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @dhanait_ajay13 ,

 

I had a discussion with the Revit Engineering team.

 

iterate through all categories. skip the built-in ones. pick Top level category with non-negative id. those are the ones you want. call Delete on those. I am not sure, though.

 

Also, Please take a look at these below links

https://thebuildingcoder.typepad.com/blog/2022/02/purge-unused-and-etransmit-for-da4r.html 

 

https://thebuildingcoder.typepad.com/blog/2022/03/purge-unused-and-the-autodesk-camel.html 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes

Hi @dhanait_ajay13 ,

 

I had a discussion with the Revit Engineering team.

 

iterate through all categories. skip the built-in ones. pick Top level category with non-negative id. those are the ones you want. call Delete on those. I am not sure, though.

 

Also, Please take a look at these below links

https://thebuildingcoder.typepad.com/blog/2022/02/purge-unused-and-etransmit-for-da4r.html 

 

https://thebuildingcoder.typepad.com/blog/2022/03/purge-unused-and-the-autodesk-camel.html 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 10 of 11

skandregula
Participant
Participant

Hi Naveen,

 

thanks for sharing the link. I was able to use it successfully. However, I did see that it doesn't purge everything material related all at once. Is there a way we can modify that and ensure that it's done in one step?

0 Likes

Hi Naveen,

 

thanks for sharing the link. I was able to use it successfully. However, I did see that it doesn't purge everything material related all at once. Is there a way we can modify that and ensure that it's done in one step?

Message 11 of 11

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @skandregula ,

 

Sorry, I am not aware of any other ways to achieve this functionality.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Hi @skandregula ,

 

Sorry, I am not aware of any other ways to achieve this functionality.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

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

Post to forums  

Autodesk Design & Make Report