Updating from IV2017 to 2018 - any API changes regarding VBA Macros?

Updating from IV2017 to 2018 - any API changes regarding VBA Macros?

bshbsh
Collaborator Collaborator
562 Views
6 Replies
Message 1 of 7

Updating from IV2017 to 2018 - any API changes regarding VBA Macros?

bshbsh
Collaborator
Collaborator

Hey,

sorry for the stupid post, but a completely unexpected decision has been made and I am going to have to upgrade the entire company from IV2017 to IV2018. Tomorrow... Going in blind, without any testing, don't like it.

I guess the update will be fine, but I have some doubts if our Macros will keep on working fine. Are there any changes in the API that may break the macros? So far I read that modifying Library occurrences is no longer possible, I'll have to fix that for sure.

Anything else to look out for?

Thanks for any information.

0 Likes
563 Views
6 Replies
Replies (6)
Message 2 of 7

bradeneuropeArthur
Mentor
Mentor

Normally spoken this will not be a huge problem because normally the API is added and not deleted.

But:

I was also having some problems in the past. 

So for sure you will run into some bigger or smaller problems.

 

Remarks:

Take the step now to learn programming add ins.

This will have more benefits and can be defined on any version of inventor.

At least for some versions back because you are able to use older SDK's

 

regards

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


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


 


EESignature

0 Likes
Message 3 of 7

pball
Mentor
Mentor

You already mentioned the library file access issue, which has a work around but the work around is apparently buggy and allows changes to library files from the graphical interface and not just the API. There is supposed to be a fix so the work around only works with the API.

 

I also found something in the pdf export code that I've been using that is from the help samples or the forum. The following line throws an error and simply has to be removed as it's no longer needed or valid in 2018.

 

If PDFAddin.HasSaveCopyAsOptions(oDataMedium, oContext, oOptions) Then

 

 

Other than that I've never had to make code changes from 2012 through 2018.

Check out my style edits for the Autodesk forums
pball's Autodesk Forum Style
Message 4 of 7

bshbsh
Collaborator
Collaborator

Thanks, that is useful info. We do use a macro for custom PDF creation.

I hope that's all. The library parts thing is my biggest concern so far.

0 Likes
Message 5 of 7

bshbsh
Collaborator
Collaborator

Ok I have ran into this:

DrawingSettings.OfflineImageFidelity says "Application-defined or Object-defined error", so can't even read it. What's with that? the API help doesn't say anything about any changes.

0 Likes
Message 6 of 7

MechMachineMan
Advisor
Advisor

@pball wrote:

You already mentioned the library file access issue, which has a work around but the work around is apparently buggy and allows changes to library files from the graphical interface and not just the API. There is supposed to be a fix so the work around only works with the API.

 

I also found something in the pdf export code that I've been using that is from the help samples or the forum. The following line throws an error and simply has to be removed as it's no longer needed or valid in 2018.

 

If PDFAddin.HasSaveCopyAsOptions(oDataMedium, oContext, oOptions) Then

 

 

Other than that I've never had to make code changes from 2012 through 2018.

 


Oddly with this one, it looks like they changed the first argument from the oDataMedium just to the document (or maybe it's always worked), so if you replace oDataMedium with the DOCUMENT object, it appears to work in 2018. The library files is a good mention too. Big perk of 2018.2 and on is the addition of global event triggers which is very nice, imo.

--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 7 of 7

bshbsh
Collaborator
Collaborator

another thing: switching color schemes is still working, but it's now stupidly slow. (but it's not the API, it's stupid slow through the gui as well.)

0 Likes