Can inventor share the code it took to make this?

Can inventor share the code it took to make this?

chris
Advisor Advisor
1,704 Views
17 Replies
Message 1 of 18

Can inventor share the code it took to make this?

chris
Advisor
Advisor

Is there a way to look at the code that inventor created to make this sweep profile on this created plane within Inventor? sort of like looking at the html/css of a webpage?

 

The reason I'm asking is because I'm trying to figure out how to create this automatically. I'm trying to use Claude.ai to create this part, but I'd like to see how Inventor is creating this part to help me figure out how to ask Claude.ai to do the correct thing.

chris_0-1743463888208.png

 

0 Likes
1,705 Views
17 Replies
Replies (17)
Message 2 of 18

Ivan_Sinicyn
Advocate
Advocate

Unfortunately, Autodesk Inventor does not provide a direct way to view the source code, similar to HTML/CSS on webpages, for created geometric objects such as a sweep profile on a specified plane. Inventor uses an internal proprietary format to store model data, which is not intended for direct reading or editing by the user in the form of text code. Instead, the program operates with parametric dependencies, mathematical expressions, and algorithms that are concealed within its core. Even if you were able to read the source data, it would not provide any useful information for an LLM or similar systems. The best approach for Claude would be to utilize example files and access to API objects, which can provide structured data and actionable insights for automation tasks.

INV 2025.3
0 Likes
Message 3 of 18

chris
Advisor
Advisor

@Ivan_Sinicyn Of course, the challenge I am running into is that I am obviously not using the right "terms" when asking claude to do something. I think this is a short coming on Autodesks part. What would be awesome is if Autodesk provided an API environment, something like the iLogic environment, but where the user could drag and drop "API snippets".

 

example:

 

Let's say you are setting up a part to build automatically and you first process is to create a sketch on a plane, you would drag in the "create a sketch on a plane" (snippet), which would then prompt you to choose a sketch plane and whether or not that plane is offset or at a n angle and if at an angle, what degree revolved which axis. The next prompt would be to describe the sketch shape or to choose form a list of proposed shapes. Once that was finished with dimensions included, you would see Inventor add the lines of code needed to create what you just requested.

 

This would be a great addition to Inventor and an even greater learning tool for those of us wishing to get onto programming with iLogic and the API

0 Likes
Message 4 of 18

Ivan_Sinicyn
Advocate
Advocate

You probably mean block programming.

I had an idea to write an MCP server for Claude, but I'm desperately short of time.

To be honest, I was hoping that Autodesk was doing some work on integration with large language models for both online help and developers. But so far there is no movement in this direction, which is unfortunate.

INV 2025.3
0 Likes
Message 5 of 18

jjstr8
Collaborator
Collaborator

@chris : It sounds similar to what I would do sometimes in Excel with the Record Macro command. I'd go through the steps I wanted to automate then look at the recorded macro to see how Excel would do it in VBA. I knew what I wanted to do, but needed help with the syntax. This has been requested many times over the years. Here's a link to the most recent Idea Board post.

Recording Mouse, Keystrokes and Commands for using in iLogic, VBA or VB.net 

 

Also, if you haven't looked at the Sample Programs in the API documentation, take a look. There's a fair amount of content and it's generally well commented.

https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=SampleList 

0 Likes
Message 6 of 18

chris
Advisor
Advisor

why does it seem we get little things with IV updates, but we don't get the big things... I mean they finally added custom array offsets, I think we'd been asking for that for over 15 years...?

Message 7 of 18

BlakeEZJTXL
Participant
Participant

Ya brought  this up before no response from autodesk.  Would be great if you could just see the relevant code it takes to make what you just sketched etc.  Although you gotta do it the hard way looking up all the needed api functions etc to make sketches etc using ilogic /vb.net rules. 

0 Likes
Message 8 of 18

hollypapp65
Advocate
Advocate

A program (Inventor, MS Windows, Chrome Browser etc) dpesn't use it's API to write the program.

API is interface for users to add function to the program.

API only has limited access to the program.  It'll never has 100%.

So getting the "code" on how the program do thing will not help writing API at all.

I highly doubt Inventor is written with VB.  C, C++ maybe.

 

There is not much Autodesk can do with AI bot programming.

Autodesk don't create the most iLogic code, user do.

It'll need lots of iLogic code to train the AI.

There is not much reason for any AI to train on iLogic or other less used code (AutoLISP etc).

 

AI don't know what it wasn't trained with.

Just like human.

0 Likes
Message 9 of 18

chris
Advisor
Advisor

@hollypapp65 I lot at it a lot like the Content Center or what CBliss use to be in the beginning. Inventor didn't create parts for us, we did, but when we created commonly used parts some of us shared them.

 

With a lot of people going "gaga" over "AI" you'd think there would be some sort of a push within Autodesk to add in something to Inventor, see as how we have an iLogic environment. I mean I got 90% there just using Claude.ai and that workflow went like this:

 

Claude.ai created me a webpage that calculated the offsets of lines within a circle based on 3 entry values. That website also included an export to Excel which Claude then used to reference the exported data in the Inventor part file I was trying to set up. Claude also created the iLogic code to create and offset all the planes based on the exported line offset data and it also created the sketches per plane.

 

What i can't seem to get Claude to do, most likely based on my ignorance of what the correct terms need to be in order to prompt Claude correctly is to create the second sketches and sweep each sketched group per plane to individually create the multiple solids.

 

Like I said I got 90% done.

 

This is where having some built in "AI" that is catered to the Inventor API and iLogic would be great. Clause is able to get stuff written, but it usually takes a series of fixing errors, which is does great  at.

 

What Inventor needs is a series of videos, similar to this: (this guy went through every Octane node and setting): 

 

where instead of showing how a feature works, like most tutorials, the series would instead show/explain how to set up and create those same sketches and features using the API so we could all learn how to create parts automatically with web forms or excel inputs, etc.

 

 

0 Likes
Message 10 of 18

hollypapp65
Advocate
Advocate

@chris wrote:

What i can't seem to get Claude to do, most likely based on my ignorance of what the correct terms need to be in order to prompt Claude correctly is to create the second sketches and sweep each sketched group per plane to individually create the multiple solids.

 

Like I said I got 90% done.

Exactly, Claude wasn't trained with iLogic and Inventor API.

Human need to pickup the missing part.

 

Another thing is API changes.  AI can only train with old version API.

 

You can prompt AI however you want.

It can't give you what it doesn't know.

 

Instead of learning how to prompt AI, how about learning Inventor API?

The hard part of using API is learning the API.  It's like learning another language.

https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-AddInAutomation

 

Who made that Octane Video?  Octane developer or Octane User?

Some Inventor API user has blogs also.

 

https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Sketch_SketchLines_Sample

VBA example on sketch.

0 Likes
Message 11 of 18

Ivan_Sinicyn
Advocate
Advocate

You're being very critical of the situation. Modern SOTA models understand the instructions and updated API information quite well, you just need to provide them with it. The main problem for Inventor API is its volume and small context window for language models. That's why there are solutions like MCP server, when the model itself accesses objects and properties of API to update information locally.

I have written dozens of automation programs for our company without understanding a single line of code. I also started with simple programs on iLogic, but ran into some limitations and switched to csharp. Yes, I had to spend time getting to know integrated development environments, git repositories and so on, but it was worth it.

From my recommendations:
1. GROK3 - For simple iLogic code. Very familiar with Invnetor API
2. Sonnet 3.7 - For complex programs so supports preloading of instructions and files.
3. ChatGPT (o3-mini series or 4o) - Occasionally, as it has better variability and can help when the previous two models hit a wall.

And as @chris wrote, you need to spell the terms correctly to get what you need.

P.S.1 And for full vibe coding I recommend Cursor or Windsurf.

P.S.2 AI Agents are also starting to develop very fast this year. So it will be even easier to code.

INV 2025.3
0 Likes
Message 12 of 18

OPthorsager
Participant
Participant

Please dont "vibe code" unless its for personal use and nothing that connects to the internet - its a massive security risk for both you and the company you work for to rely on vibe coded software. for your problem specifically you can look at the syntax for iLogic to figure out how to create sweep extrusions. Ontop of learning to code, you also get to feel good about not spending ridiculously large amounts of energy on simple tasks that you could do yourself - i get that AI is more efficient for some use cases, but the energy consumption of a single simple(quite frankly unnecessary) prompt really isnt good for the environment...

 

I attatched a funny little 3 picture story of a guy who learned that vibe coding isnt all that good the hard way 🙂

Message 13 of 18

Ivan_Sinicyn
Advocate
Advocate

You're exacerbating the problem a bit. I don't understand how to write code, but I've quite learned to read it at a basic level. I can see the chain of interaction and sequence perfectly well and can identify potential risks perfectly well. It is necessary to be completely lost in this world that creating a program for extruding geometry additionally provide open access to its servers)))). The AI can write anything, but I am obliged to read and analyze it anyway.
In the example you gave, a person just went too deep and tried to sell it as a service. He was just punished for his arrogance.

INV 2025.3
0 Likes
Message 14 of 18

BlakeEZJTXL
Participant
Participant

Well having api keys exposed is always a security risk, always have to be mindful what you're doing vibe coding or not.  The nice thing about the ilogic environment is you don't need an api key unless you're using an ide.

0 Likes
Message 15 of 18

hollypapp65
Advocate
Advocate

Hmmm write a MCP to answer work emails.

I'll need to learn "Vibe Engineering".

Keep vibing.

 

https://visualstudiomagazine.com/Articles/2025/03/20/AIs-Takeover-of-Software-Development-Gets-a-Nam...

0 Likes
Message 16 of 18

chris
Advisor
Advisor

I get that you guys are having a programmers convo, which I don't understand. I think you might be taking my comments the wrong way. I'm not trying to expose security risks and I don't know what "full vibe coding" is. I was just trying to make a comparison that when  new Inventor user opens iLogic, iLogic has snippets to get you going, but there aren't really any "Snippets" for doing anything with the API, which would be nice.

 

Example: If you want to create a new part, a cube with a hole in it, from an excel sheet, that is like 60-130 lines of code... not snippets, but code that isn't very easy to learn. Do I want to take the time to learn all that, of course... do I have that time to set aside, while also doing my normal workload, no.

For me, using the API to help me write 7/8 of the code needed to get something done saves time and I have started to understand how very simple things are laid out, Although "simple" is subjective.

0 Likes
Message 17 of 18

hollypapp65
Advocate
Advocate

@chris wrote:

I was just trying to make a comparison that when  new Inventor user opens iLogic, iLogic has snippets to get you going, but there aren't really any "Snippets" for doing anything with the API, which would be nice.

 

Those Snippets/Wizard are installed with Developer SDK into Visual Studio.

You'll need the supported version of VS, usually a few version behind.  Not Community version.

https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-6FD7AA08-1E43-43FC-971B-5F20E56C8846

0 Likes
Message 18 of 18

hollypapp65
Advocate
Advocate

@chris wrote:

Do I want to take the time to learn all that, of course... do I have that time to set aside, while also doing my normal workload, no.


The catch 22, you need time to work and need time to learn.

 

I reality, if you can't do what you need to do, you have time to learn.

If you don't learn, you'll never have time.

 

Right now I got 280 working days of drawings to update.  It means I'll be doing nothing else.

A new revision before I finish will reset it to beginning again which happened a few times already.

This is drawings for one sub-assembly in the assembly.

Any investment in programming/automation will pay off very fast.

0 Likes