CreateImageWithOptions method

CreateImageWithOptions method

SašoPrijatelj
Advocate Advocate
886 Views
5 Replies
Message 1 of 6

CreateImageWithOptions method

SašoPrijatelj
Advocate
Advocate

There is a new method Camera.CreateImageWithOptions( Width As Long, Height As Long, Options As NameValueMap ) in Inventor 2017. API documentation doesn't describe it very well. Does anybody know what are the available options for this method?

 

-----------------------------------------------------------------------
AutoDXF - automatic flat pattern creation and batch export to DXF for Inventor

Please use "Accept as Solution" & give "Kudos" if this response helped you.
0 Likes
Accepted solutions (1)
887 Views
5 Replies
Replies (5)
Message 2 of 6

asiteur
Collaborator
Collaborator

Haha, very good question indeed. The documentation is blank when it gets intresting.

I would assume that options are directly related to the camera, have you tried to specify camera properties as options?



Alexander Siteur
Project Engineer at MARIN | NL
LinkedIn

0 Likes
Message 3 of 6

SašoPrijatelj
Advocate
Advocate
No, I haven't tried that. But I was wondering if there is a way to write out all available options for specific NameValueMap?
-----------------------------------------------------------------------
AutoDXF - automatic flat pattern creation and batch export to DXF for Inventor

Please use "Accept as Solution" & give "Kudos" if this response helped you.
0 Likes
Message 4 of 6

asiteur
Collaborator
Collaborator

Hi,

 

The problem is that the NameValueMap is a generic object to specify options. You can add any option you like, but if the method using these options doesn't know how to handle it, it will probably cause errors.

 

So if you have a filled NameValueMap from some process or other object then you could read it out (Using a watch in VBA for example) but in this case I wouldn't know of a way to get the options out.



Alexander Siteur
Project Engineer at MARIN | NL
LinkedIn

0 Likes
Message 5 of 6

wayne.brill
Collaborator
Collaborator
Accepted solution

Hi,

 

I found these descriptions for options for CreateImageWithOptions(). A colleague in Inventor Engineering confirmed they apply to Inventor 2017. 

 

TopBackgroundColor
Color Specifies the background color at the top of the image. If a bottom background color is supplied, then the background will be a gradient between the top and bottom colors. If only a top background color is supplied, the background will be a solid color using this color. If no color is defined a default color will be used.

 

BottomBackgroundColor
Color Specified the background color at the bottom of the image. This argument is only valid when the TopBackgroundColor argument has been supplied. This argument defines the color of the background at the bottom of the image and a gradient background is created that varies from the top color to the bottom color.

 

AntiAliasing
Boolean Specifies whether apply the anti-aliasing effect for the image. If not specified this will default to False.

 

IncludeEdits
Boolean Specifies whether the saved image will include the edits to current camera even the edits are not applied yet. If not specified this will default to False.

 

 

Thanks,

Wayne



Wayne Brill
Developer Technical Services
Autodesk Developer Network

Message 6 of 6

SašoPrijatelj
Advocate
Advocate

Wayne,

 

thank you for detailed explanation. You should add that to API help which is blank in this chapter.

 

Best regards,

 

Sašo.

-----------------------------------------------------------------------
AutoDXF - automatic flat pattern creation and batch export to DXF for Inventor

Please use "Accept as Solution" & give "Kudos" if this response helped you.
0 Likes