SketchImage transparency via API in Inventor 2019

SketchImage transparency via API in Inventor 2019

Anonymous
Not applicable
668 Views
4 Replies
Message 1 of 5

SketchImage transparency via API in Inventor 2019

Anonymous
Not applicable

We have problems with setting SketchImage transparency via API in Inventor 2019
In previous versions we just set SketchImage.Transparency property to true and it's works in most cases

Code example:

PlanarSketch sketch = compDef.Sketches.AddWithOrientation(compDef.WorkPlanes[3], compDef.WorkAxes[1], true, true, compDef.WorkPoints[1]);
SketchImage img = sketch.SketchImages.Add(pngFileName, ptOrigin);
img.Transparent = true;

But in Inventor 2019 SketchImage Transparency was improved and now we can set Chroma Key for image mask and even use alpha channel via UI.
We can't choose "Use Alpha" option or set Chroma Key for SketchImage via Inventor 2019 API, only Transparent property available (as in previous versions). Setting Transparency property to true don't apply transparency, since chroma key is white by default for our images. In Inventor 2018 same code works fine.

Is there any way to choose Use Alpha option or set chroma key via Inventor 2019 API or any workaround for these options?

0 Likes
669 Views
4 Replies
Replies (4)
Message 2 of 5

MjDeck
Autodesk
Autodesk

There is no API for the new options yet. But setting the Transparent property should work the same as it did in 2018. Maybe 2019 has a problem with some images. Can you post an image file that demonstrates the problem?


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 3 of 5

Anonymous
Not applicable

Hello.

Thank you for reply.

Image in attachment.

0 Likes
Message 4 of 5

MjDeck
Autodesk
Autodesk

I see the problem now. Thanks for reporting this. It has an internal issue number: INVGEN-19288.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 5 of 5

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

It seems that issue is fixed in Inventor 2020 and Inventor 2020. Can you please verify the same and confirm it?

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes