Reset / Clear Graphics overrides API

Reset / Clear Graphics overrides API

Anonymous
Not applicable
5,193 Views
2 Replies
Message 1 of 3

Reset / Clear Graphics overrides API

Anonymous
Not applicable

Hello,

 

I am struggling in search for solution for some time. Can someone help me or guide me to post which explains this: how can i reset graphicoverrides by element if i set them out like this?

ElementId ID = RB.Id;
OverrideGraphicSettings orGsty= new OverrideGraphicSettings();

 foreach (FillPatternElement FP in FillPattern)
                    {
                        if (FP.Name == "Solid fill")
                        {

                            orGsty.SetProjectionFillPatternId(FP.Id);
                        }
                    } 
using (Transaction t = new Transaction(doc, "Set Element Override"))
                        {
                            t.Start();
                            doc.ActiveView.SetElementOverrides(ID, orGsty);
                            t.Commit();
                        }

How can i reset overrides trough API?

 

Thanks in advance!

0 Likes
Accepted solutions (1)
5,194 Views
2 Replies
Replies (2)
Message 2 of 3

matthew_taylor
Advisor
Advisor
Accepted solution

Hi @Anonymous,

You can just pass in a new OverrideGraphicSettings without any modifications.


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 3 of 3

Anonymous
Not applicable

Hello @matthew_taylor,

 

easy and effective 🙂 that is solution! Thank you.

 

"Why make things simple when one can make them complicated?" 

 

0 Likes