Access parameters without Inventor running in the background

Access parameters without Inventor running in the background

bhattarai_suyesh
Contributor Contributor
1,065 Views
12 Replies
Message 1 of 13

Access parameters without Inventor running in the background

bhattarai_suyesh
Contributor
Contributor

I currently have code that opens an Inventor session in the background and takes inputs from the user in a customized .net interface. The code that allows access into the Inventor parameters is as follows:


System.Type oType = System.Type.GetTypeFromProgID("Inventor.Application"); // Start new Inventor session.
inventorApp = (Inventor.Application)System.Activator.CreateInstance(oType);
inventorApp.Visible = false; // Make Inventor invisible.

inventorModel = inventorApp.Documents.Open("C:\\filename.ipt", false) as Inventor.Document;

PartDocument partDocument = inventorModel as PartDocument;

Parameters parameters = partDocument.ComponentDefinition.Parameters; //define parameters variable
parameters["x"].Value =  10; //change parameter value

 

This code opens the Inventor application and the active document in the background. 

 

Is there any option where we can change the parameter value without running Inventor at all?

0 Likes
Accepted solutions (1)
1,066 Views
12 Replies
Replies (12)
Message 2 of 13

Ralf_Krieg
Advisor
Advisor

Hello

 

No, there's no other way afaik.


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 3 of 13

bradeneuropeArthur
Mentor
Mentor

Depends on what you try to do with it.

Otherwise you can use apprentice server for it!

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 4 of 13

bhattarai_suyesh
Contributor
Contributor

I want to be able to read and write parameter values and iproperty fields of the Inventor files (asm, ipt and idw).

I am developing a custom UI for that takes in dimension parameter values as user input and provides weight calculations of the complete assembly. The sales team do not use Inventor but could get proper estimates on weight without bothering the design team for each sales inquiry if this was possible. 

0 Likes
Message 5 of 13

bradeneuropeArthur
Mentor
Mentor

Write parameters and edit them with apprentice is not possible.

Read parameters is possible

Read and write properties is possible

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

Message 6 of 13

bhattarai_suyesh
Contributor
Contributor

This is good to know. Thank you.

 

But it still does not solve the issue i am trying to address (edit parameters without Inventor running).

So, i will leave this thread active. 

0 Likes
Message 7 of 13

Ralf_Krieg
Advisor
Advisor
Accepted solution

Hello

 

There is no way to write parameters without Inventor. As parameters can affect geometry, you need Inventor to recompute your model, change depending parameters, volume, weight and so on. If your parameter is not used in your model, delete it and create instead a user defined property. This can be changed by Apprentice which is smaller and much faster to start.

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
Message 8 of 13

WCrihfield
Mentor
Mentor

Just a couple of thoughts:

Maybe you can have your Inventor document's parameters 'linked' to an external Excel type spreadsheet document (.xls or .xlsx), that way you can interact with the externally referenced parameters document without needing Inventor.

 

Or have the routine set-up within your Inventor document, where it automatically exports its Parameters to an XML document when you save/close it, then import that XML when it opens.  That way you can mess with the parameters within the XML document without Inventor, then have the result show the next time you open the Inventor document.

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 9 of 13

CattabianiI
Collaborator
Collaborator

Another idea to do Inventor things without Inventor is Forge Inventor Design Automation: create a simple UI where the sales office enters the parameters, post model and data to Inventor Server, download computed weight, configured model, or any data available in Inventor.

Useful links:
https://forge.autodesk.com/en/docs/design-automation/v3/tutorials/inventor/
https://inventor-config-demo.autodesk.io/
https://forge-showroom.autodesk.io/

https://github.com/Autodesk-Forge

https://github.com/Developer-Autodesk

Message 10 of 13

bhattarai_suyesh
Contributor
Contributor
This is what i have been doing for the design team to speed up the workflow, as they work in inventor.
But the sales team are mobile and want light-weight solution. Hence, my question.
0 Likes
Message 11 of 13

bhattarai_suyesh
Contributor
Contributor
Yes, this makes a lot of sense.
We can not expect to get the recomputed values without running the core engine, can we?
So the option for me would be run inventor in invisible mode to make things a tad bit quicker and less messy.
0 Likes
Message 12 of 13

bhattarai_suyesh
Contributor
Contributor
Forge looks really exciting.
But I have long list of input parameters and have multiple optimization routines running based on those inputs. Then, more inputs based on optimization outputs.
I am not sure if Forge would be able to handle all of that?
0 Likes
Message 13 of 13

CattabianiI
Collaborator
Collaborator

I haven't done anything in production with Forge yet, but as far as I know and tested what can be done in a non-visible Inventor without user interaction can be accomplished in the Inventor server on Forge. So it really shouldn't matter how big your input list is.

0 Likes