i need a macro in VBA who export the structurated part list in xls separated by comme with only two cullom in order: Quantity and Part Number.
This .xls file mus be saved in the same folder where the .iam file is saved and with the same name of the .iam file.
Can someone help me to make this marco????
about sorting CSV file, it is nothing Inventor API can do. Probably the posts below help?
Can I import a xml template in the structurated part list with VBA?????
I use one template who set automaticly the column in the structurated part list!
My approach would probably be to populate an excel worksheet by iterating throught the appropriate BOM items then plucking out the part number and quanitites. Once it is in excel you can use then sort the data using the vba commands for excel.
You will need to reference excel in the inventor VBA to be able to do it.
Then you will have to start an instance of excel. Iterate through the cells as you copy the data from the BOM.
Sorry I cant help any more I dont have inventor on my laptop.
Ok so yes you can work with excel from Inventor VBA.
Dim excel_app As Excel.Application
' Create the Excel application.
Set excel_app = CreateObject("Excel.Application")
' Uncomment this line to make Excel visible.
'excel_app.Visible = False
This little tiny bit of code will make it so you can edit a spreadsheet
Basically you put excel_app in front of your standard excel vba code to make them work from inventor vba.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.