What is the best workflow for loading a model from a command line script, then reading parameters from a csv file (or Excel) and updating the model based on those parameters?
Thanks in advance!
Workflow will most likely be a program... You could probably launch this through the Inventor Task scheduler and then have a trigger launch an iLogic program that reads the CSV file Do you have any programing experience or ever used the Inventor Task Scheduler?
Also what are you trying to accomplish? Are you trying to generate standard models based on orders? My line of questioning is leading up to Configurator 360.
Mark Lancaster
& Autodesk Services MarketPlace Provider
Autodesk Inventor Certified Professional & not an Autodesk Employee
Likes is much appreciated if the information I have shared is helpful to you and/or others
Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
I am working on building a online configurator.
We started with C360, but I have lost faith in it (and Autodesk) because they drastically changed the terms of use for C360 (and most of their products). We spent a lot of time preparing to use C360 and they eliminated the $300 / quarter terms (which worked great during development) and made the $3000 / year package the entry level program.
What's next? With ETO and the acquisition of ConfigureOne, I'm left wondering if C360 will even be around in a few years.
That's why we want to develop our own system.
I am a PHP / MySQL / Javascript programmer -- that's what I know, so I want to build a configurator around those technologies. PHP can be used to run a command line script to start the process.
The idea is to allow the web user to fill out a form, selecting the product features, and write the selections to a csv or Excel file, then use PHP to start Inventor (dedicated to this purpose so no licensing terms are violated) with a command line parameter that loads a model set up to read the csv file with the parameters. Probably iLogic could then be used to do whatever else needs to be done, like generate drawings.
The next thing I need to figure out is how to use a command line to start Inventor with a specific model.
Then I need to figure out how to make it read a csv file and configure the model based on the contents of the csv file.
Any help would be appreciated!
- Ron
Here is a powershell snippet how you can open Inventor and load a part:
Start-process -FilePath "C:\Program Files\Autodesk\Inventor 2018\Bin\Inventor.exe" -ArgumentList @("/i C:\Users\patrick.gruber\Desktop\Standard.ipt") -Wait
Dunno if this topic is active in any way.
But I would suggest using vbScript to create an inventor application, open the file and change the parameters.
vbscript files can be simply created using any text editor and store them as .vbs
This script can be used to create an inventor instance:
Dim oInvApp
set oInvApp = CreateObject("Inventor.Application")
oInvApp.Visible = True 'if you like to see what it is doing
Dim oInvDoc 'EDIT this was previously declared as Inventor.Document.
'But that is not allowed as no reference to inventor is set.
set oInvDoc = oInvApp.Documents.Open("string to part, which can be passed using arguments")
'do further stuff here
Call oInvApp.Quit 'close inventor
I know for sure it is possible to load an inventor vba library and run a macro from this library, so you could even keep this code compact and do the csv update using inventor vba (however, I am not certain if passing arguments is possible). In the command prompt, you can run this file using (assuming you have set the cd to the drive in which the .vbs script is located):
cscript myVBscript.vbs
About passing arguments using this method, I suggest looking into this page:
Hope this helped,
Peter Verheijen
EDIT: changed the code slightly, see the EDIT there for what I changed. it is important to note that vbScript does not have the option to add references, so everything must be an undefined object. Because of this I do strongly advice to keep the most crucial parts of the code in an environment that does allow declaring variable types (such as inventor vba)
Can't find what you're looking for? Ask the community or share your knowledge.