Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Code not working in 2018 but works in 2012

jletcher
Advisor

Code not working in 2018 but works in 2012

jletcher
Advisor
Advisor

 I have looked this over and I can't figure out why it is giving me this error.

 

1st time I even seen this kind of error on ilogic.

 

Strange.JPG

 

 

I supplied the part I will warn you don't hit continue it will stick you in a loop and you will have to force close Inventor.

 

Now this is in a library folder it works if the part is in the project workspace but I can't have that they need to be in a library so they cannot modify the part by accident .

 

It works fine in 2012 as a library but not in 2018.

 

Thanks for the help.

 

 

0 Likes
Reply
4,843 Views
168 Replies
Replies (168)

jletcher
Advisor
Advisor

That way works as well...

 

Thanks

0 Likes

jletcher
Advisor
Advisor

 It is only for clients library parts none of my clients use Inventors we found it to slow things way down in the large assemblies.

 

 Plus the descriptions are not what the like and takes to much time too change them all..

 

 

0 Likes

jletcher
Advisor
Advisor

I just want you to understand that this is wrong making users go through all their ilogic code to fix a AutoDesk mess up. I have over 200 parts I have to now go update so it works. 

 

 There is no way I can get my clients to pay for this I would not feel right charging them for something AutoDesk screwed up.

 

This should have been a hot fix or update pack. 

 

 

0 Likes

MechMachineMan
Advisor
Advisor
What's wrong is making up workflows willy nilly that aren't supported by
the developers.

Library parts and content center are made to have a very hard to change see
description as they should only be modified once and used the same in all
other cases.


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

jletcher
Advisor
Advisor

Willy nilly workflows? This workflow was made because developers gave me ilogic so not sure where you get not supported by the developers. These willy nilly parts make their own tables some make their own drawings. This workflow was the greatest gift the developers gave. What you fail to understand I gain 60% performance boost using my library rather than Inventors as for nuts bolts in single files not iparts. You lose a lot of performance with iparts so I stay away from them.

 

 AutoDesk also don’t have 95% of the parts I have made with ilogic I believe that is why the gave us ilogic like legs, plates with holes, spacers, sidebodies, stairs, cabinets all this I have as ilogic as library parts so the engineers don’t mess the masters up. Worked from 2010 to well now.

 

  

0 Likes

jletcher
Advisor
Advisor

 This really needs to be fixed with a hot fix or something the code is not working 100% and I am sick of trying to figure out why.

 

I removed the solutions because it does not work 100%.

 

 

0 Likes

jletcher
Advisor
Advisor

This is unbelievable I took out the library so I can make parts but I can't have this.

 

 

The next issue is when placing ilogic part in assembly this dang thing pops up.

 

Really Bull.JPG  

 

And it makes another duplicate with a "-1"

 

Not.JPG  

 

 I am just getting really upset users should not have to go through all this bull when you release new Inventors..

 

 

0 Likes

jletcher
Advisor
Advisor

Like right here..

 

 

 I made one part then went to make another and BAM stuck in this loop AGAIN.

 

See.JPG 

 

 2018 is start to be a BIG mistake.

 

Now I have to close everything I worked on force close Inventor.....

 

^#%#^#*&#*&@$&%@(*%&

0 Likes

Frederick_Law
Mentor
Mentor

Are you willing to try save the file in a non-library location first then move it to library?

This should prevent any library modification restriction.

0 Likes

jletcher
Advisor
Advisor

Not following what you are asking..

 

 These files are not in a "Inventor library" they are in a folder I link under library under the project ipj.

 

 

So I guess basically they are already saved out side of a library and linked to projects...

0 Likes

Frederick_Law
Mentor
Mentor

Library in Project are read only.  That's maybe why the code fail.

0 Likes

bradeneuropeArthur
Mentor
Mentor

Hi,

 

I don't understand the issue anymore.

Library; not library; linked under library folder under Project.ipj???

 

Can you please provide some more details and information of what you try to do.

 

Think that there is a better solution for this if we have consistent information.

 

I don't get an overview anymore regarding this.

 

Sorry! 

 

As programmer you need to have adequate exception handling to see where the error occurs and why they occur.

Simple programming only the tasks and codes needed for the result is 1 but more important is the exception handling.

 

This I assume is missing in your coding, or isn't it!??

 

So please review your coding first and you will see why things are happening.

 

Look at this to modify library parts:

 

https://www.youtube.com/watch?v=2f8CLU8eUdY

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

Frederick_Law
Mentor
Mentor

I have similar folder setup.

I put all the hardware and purchase part in a folder and its in the Library section of the Project.

This way I can't accidentally modify them.

I don't create file in that folder.  I create part and assembly outside the "Library" and move them after.

I also have code to modify iProperties which will ignore anything in a Library.

 

When I need to modify anything in the Library, I use another Project which use the folder as Workspace and nothing in "Library".

0 Likes

jletcher
Advisor
Advisor

 The issue is it worked from 2010 to 2012 and then 2018 no longer works.

 

Same workflow as all releases..

 

I have about 200 ilogic parts that do different things.

 

Spacers you can change material and length. Some have threads some are just plates with a single hole. Some make their own drawings and some fill in BOM with information on how to build.

 

 

 When the engineer needs to make a spacer he goes to a library folder that is nothing but a folder on the server link by IPJ project under libraries.

 

Library.JPG

 

 

As you can see in the above. The hardware are none ilogic so no issues there.

 

Tthe 625A-Series parts are about 50 custom parts with ilogic code they will open the one they need, using the form they pick the options they want and hit apply. The part then gets made into the options they picked in the form. The part is then saved under the project path as the part number generated by the options picked and a drawing is made automatically.

 

The 900C7 are spacers different diameters and some are threaded and some are not. The engineer will pick the spacer needed  like a 1.000 OD Tap .375-16 Both Ends-SS is 900C7Z it will open and the engineer will click the form button and only information he can enter is a length. He then hits apply. The ilogic code makes up the part number 900C7Z-1.250 the 1.250 is the length. There is about 30 of these type spacers.

 

Then there is side bodies, legs, rails, chain guards many many parts...

 

The issue is 2018 whatever they did they need to make a hot fix not this work around code that seems to work when it wants to..

 

 

There is no reviewing of the code it worked for 5 years this is one area Autodesk need to be careful some of my ilogic parts took weeks to build. And locking them in a library stops engineers from changing them and messing them up.

 

This issue can't be passed on to the users this needs to be fixed internally with a update pack or a hot fix. This code provided does not work.

 

If you need more information let me know.

 

 

 

 

0 Likes

MechMachineMan
Advisor
Advisor

What triggers the code to run?

 

What is the workflow for "placing"/creating the part?

 

Does the user use "Place iLogic Component"?

 

Do they place any random part from the set of parts that is then somehow triggering a rule?

 

Do they use a form and select the part to place from there?

 

Are they selecting an existing part and then running a rule which changes that part?


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

bradeneuropeArthur
Mentor
Mentor
Hi.
As you can see this is one of the disadvantages of build in code like VBA an I logic.

Hope you will change to add ins this is to be kept into consideration.

I logic is not meant for this.

This seems to be very unsatisfied for you at the moment. But start doing this will prevent you from this errors in future.

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

jletcher
Advisor
Advisor

What triggers the code to run?

 

They press the form in the ilogic tree..

 

What is the workflow for "placing"/creating the part?

 

Click the library that has the part it opens the folder they pick the part they want. Most use place component after it is made or they copy and paste into the assembly.

 

Does the user use "Place iLogic Component"?

 

No.

 

Do they place any random part from the set of parts that is then somehow triggering a rule?

 

No rule is triggered till after they hit apply.

 

Do they use a form and select the part to place from there?

 

Form is only used to select options within a part no form is used to select the parts or to be placed.. I believe the second post I made in thread has sample. 80% are made in this fashion..

 

Are they selecting an existing part and then running a rule which changes that part?

 

 Yes the part is in the library, the changes are made and when they hit apply the part is then generated from that master file they picked, a code uses the save as option that sends it to the project path folder. The master is never changed. If they made a mistake they cannot re-use a part already generated by the master they have to make new from the master.

 

Thanks for your patients and help....

0 Likes

Frederick_Law
Mentor
Mentor

The "ability" to modify Library can be consider as a "bug" or "security risk".

AutoDesk just patched it.  It happens all the time.  Like when Microsoft patch something and other program crash or Inventor stop working.

0 Likes

jletcher
Advisor
Advisor

As you can see this is one of the disadvantages of build in code like VBA an I logic.

 

I don't get why this is a disadvantage.

Hope you will change to add ins this is to be kept into consideration.

 

Add ins? no one makes add ins for my clients.

I logic is not meant for this.

 

This was the vary reason ilogic was made so not sure why you think that.

This seems to be very unsatisfied for you at the moment. But start doing this will prevent you from this errors in future.

 

Unsatisfied because Autodesk does not fix issues but throw workarounds at the users rather than fixing their mistakes..

 

 Not sure what you want me to start doing.

 

 

Seems anything you do today in Inventor is not going to work in the future and that is not going to be a good selling point for Inventor but good ammo to keep people away from it.

 

Can you imagine if drawings you made in Autocad can no longer be opened in new release people would not be happy. Well here is a great example people took weeks some years to make an ilogic dance to install a new inventor and those files no longer work will keep people away.

 

As of right now I am trying to keep my clients on Inventor but after this, one is think of changing. He said if he can't use parts made 6-7 releases ago then he might as well start from scratch... His subscription is about up for renew and he is thinking of not renewing it.

 

When they changed interface I lost a client he went back to Autocad said he is not going to be forced to work they way Autodesk wants him to. He will stay on that same Autoccad till he retires..

0 Likes

MjDeck
Autodesk
Autodesk

 Just set

ThisApplication._LibraryDocumentModifiable = True

in every rule that might ever try to modify a library part.

You don't ever have to set it back to False. It only affects API calls. It sounds like you didn't have problems with modifying library parts before. So you're not likely to have them now, once you set this to True.
(in VBA:
ThisApplication.[_LibraryDocumentModifiable] = True


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes