Set Fill Pattern Programatically

Set Fill Pattern Programatically

jainn
Advocate Advocate
2,403 Views
8 Replies
Message 1 of 9

Set Fill Pattern Programatically

jainn
Advocate
Advocate

Hi,

 

How to set Fill Pattern Programatically in Filters(Under Visibility/Graphic Section).

 

Please suggest

 

Regards

Namit

 

0 Likes
Accepted solutions (1)
2,404 Views
8 Replies
Replies (8)
Message 2 of 9

Aaron.Lu
Autodesk
Autodesk
Dear, did you try this method:

OverrideGraphicSettings ogs = theView.GetFilterOverrides(filterElement.Id);


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 3 of 9

jainn
Advocate
Advocate

Dear Aaron,

 

We are doing same.

Able to set fillters and color, but not able to set Pattern Style( Fill Solid).

screen shot is attach for reference.

 

FillPatternGraphics.PNG

 

 

 

 

Regards

 

 

 

0 Likes
Message 4 of 9

Revitalizer
Advisor
Advisor

Hi jainn,

 

after SetCutFillPatternId make sure to call SetCutFillPatternVisible(true).

SetProjectionFillPatternId will need SetProjectionFillPatternVisible(true), analogously.

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 5 of 9

jainn
Advocate
Advocate

Dear Revitalizer,

 

Thanks for your Reply,

 

I am able to set color and filter and make it to visible but still not able to set pattern style(fill solid  etc)

 

Capture.PNG

 

 

 

Regards

 

0 Likes
Message 6 of 9

jainn
Advocate
Advocate
Accepted solution

Hi All,

 

Got it. Its resolved...

 

have to use this Method to set pattern style

 

SetProjectionFillPatternId(ElementId).

 

 

Regards

 

Message 7 of 9

Aaron.Lu
Autodesk
Autodesk
Great!


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 8 of 9

Anonymous
Not applicable

Hi jainn,

      

About that SetProjectionFillPatternId(ElementId);

 

I passed the element Id of that element but I don't see any change in the model. I am supposed to pass the elementId of the pattern right? Where do I find it? Can you please help me with it?

 

Thanks,

Santhosh 

0 Likes
Message 9 of 9

Anonymous
Not applicable

Have you found a solution?

 

I have the same problem.

0 Likes