Announcements

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

Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Export image from select objects Drawing Inventor 2020 -addin

11 REPLIES 11
Reply
Message 1 of 12
Anonymous
801 Views, 11 Replies

Export image from select objects Drawing Inventor 2020 -addin

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

 

11 REPLIES 11
Message 2 of 12
bradeneuropeArthur
in reply to: Anonymous

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 !

Message 3 of 12
Anonymous
in reply to: bradeneuropeArthur

HI 

Thank you for the reply. 

 

I only want a selection.

 

 

Message 4 of 12
bradeneuropeArthur
in reply to: Anonymous

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 !

Message 5 of 12
Anonymous
in reply to: bradeneuropeArthur

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

Message 6 of 12

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 !

Message 7 of 12
Anonymous
in reply to: bradeneuropeArthur

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 

 

Message 8 of 12
bradeneuropeArthur
in reply to: Anonymous

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 !

Message 9 of 12
Anonymous
in reply to: bradeneuropeArthur

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!!

 

Message 10 of 12
bradeneuropeArthur
in reply to: Anonymous

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 !

Message 11 of 12
Anonymous
in reply to: bradeneuropeArthur

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 

Message 12 of 12
bradeneuropeArthur
in reply to: Anonymous

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 !

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report