Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Export image from select objects Drawing Inventor 2020 -addin

Anonymous

Export image from select objects Drawing Inventor 2020 -addin

Anonymous
Not applicable

HI All

 

I would need your help on the export image from Inventor drawing 2d.

We are want to write add-in that end-user can select the object from drawing 2D in Inverter than Click button Export.

C# will export the object from 2D drawing to image save to somewhere in the file server.

 

Please help me if you are professional on that 🙂 A thousand.

One guy have done it in AutoCAD but now we move AutoCAD to inventor we need to migrate this function to inventor too

Annotation 2019-05-08 114913.png thanks

 

0 Likes
Reply
803 Views
11 Replies
Replies (11)

bradeneuropeArthur
Mentor
Mentor

Do you like to export the complete drawing as image or only the selection in the drawing?

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Anonymous
Not applicable

HI 

Thank you for the reply. 

 

I only want a selection.

 

 

0 Likes

bradeneuropeArthur
Mentor
Mentor

That is more difficult.

The other option (Complete Drawing) is easier, so I need to take a deeper look at it and do some investigation.

 

I will reply when I have something.

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

0 Likes

Anonymous
Not applicable

Thank you for your reply. I am looking forward to hear from you 🙂 

0 Likes

bradeneuropeArthur
Mentor
Mentor

Does this help you alreadt?

 

Public Sub SaveAsBmp()
    ' Get the active view.
    Dim oView As View
    Set oView = ThisApplication.ActiveView
    
 'Create a new NameValueMap Object
    Dim oOptions As NameValueMap
    Set oOptions = ThisApplication.TransientObjects.CreateNameValueMap '.TransientObjects.CreateNameValueMap
    
    oOptions.Value("TransparentBackground") = True 'True
    oOptions.Value("OnlyShowActiveComponentsForIn-PlaceEditing") = True
    oOptions.Value("OnlyShowActiveComponentsForInPlaceEditing") = True
    'oView.Fit
    Call oView.SaveAsBitmapWithOptions("C:\Temp\TestB2.bmp", 0, 0, oOptions)
End Sub

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

0 Likes

Anonymous
Not applicable

HI ,

I have searched then see that. But I don't know how to convert it into C# do you have any idea about that?

I stay at this step. Sorry I just new dev don't have experience.

image.pngimage.png 

 

0 Likes

bradeneuropeArthur
Mentor
Mentor

I could create an add in for it, but only with VB.net!

Please let me know what you prefer..

regards,

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Anonymous
Not applicable

Okay. If that the only choice could you please give me the full source code of add-in

I need to do a lost customizes after export photo 🙂

Thank you so much!!

 

0 Likes

bradeneuropeArthur
Mentor
Mentor

The easiest and quickest way for this moment is to use a VBA macro in inventor.

With this you can already start today, and you don't have to wait.

 

Regards,

 

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

0 Likes

Anonymous
Not applicable

thanks. I don't refer to use VBA. Macro.

 

C# will be more professional  and structure than Macro

 

If you know want code can export pictures from inventor 2020 from C# please share me! thanks 

0 Likes

bradeneuropeArthur
Mentor
Mentor

Hi,

 

The code for Vb.net is above.

For C# I don't have.

For the Vb.net add in you have to wait, or......

You need to provide me an vb.net add in where  I only have to add the specific code in it for you.

This means wou need to share an add-in with a toolbar for the ribbon and a button event.

Than I paste my code in it and that's it.

 

VBA is at least very easy and you don't have to wait till the add-in template is ready form your side.

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

0 Likes