Discussion:
iProperties Linking to Excel Files
(too old to reply)
lcreasy1
2005-03-07 20:46:09 UTC
Permalink
Hello.

How would I link the iProperties of an Inventor Part, Assembly, or Drawing file to an excel file so that when I open, change, and save an excel file, the fields of the iProperties for the various files are changed as well? I have been able to "Link" the excel to the user parameters, but I can't import them into the iProperties. Any ideas?
Calimesa
2005-03-07 21:18:51 UTC
Permalink
I might be wrong but am not sure you can do that. Anyone?
Post by lcreasy1
Hello.
How would I link the iProperties of an Inventor Part, Assembly, or Drawing
file to an excel file so that when I open, change, and save an excel file,
the fields of the iProperties for the various files are changed as well? I
have been able to "Link" the excel to the user parameters, but I can't
import them into the iProperties. Any ideas?
Sanjay Ramaswamy (Autodesk)
2005-03-07 22:08:09 UTC
Permalink
Checking the 'Export Parameter' flag in the parameters dialog for a
parameter will create a file property for the parameter in the custom
property set. This can be achieved by setting the
Parameter.ExposedAsProperty property to True in the API.

Sanjay-
Post by Calimesa
I might be wrong but am not sure you can do that. Anyone?
Post by lcreasy1
Hello.
How would I link the iProperties of an Inventor Part, Assembly, or Drawing
file to an excel file so that when I open, change, and save an excel file,
the fields of the iProperties for the various files are changed as well?
I
Post by Calimesa
have been able to "Link" the excel to the user parameters, but I can't
import them into the iProperties. Any ideas?
Calimesa
2005-03-07 22:13:33 UTC
Permalink
Sanjay,
I don't mean the parameters. I mean iproperties such as date, design
status...
Thanks.
Post by Sanjay Ramaswamy (Autodesk)
Checking the 'Export Parameter' flag in the parameters dialog for a
parameter will create a file property for the parameter in the custom
property set. This can be achieved by setting the
Parameter.ExposedAsProperty property to True in the API.
Sanjay-
Post by Calimesa
I might be wrong but am not sure you can do that. Anyone?
Post by lcreasy1
Hello.
How would I link the iProperties of an Inventor Part, Assembly, or
Drawing
Post by Calimesa
file to an excel file so that when I open, change, and save an excel file,
the fields of the iProperties for the various files are changed as well?
I
Post by Calimesa
have been able to "Link" the excel to the user parameters, but I can't
import them into the iProperties. Any ideas?
Sean Dotson
2005-03-08 13:23:14 UTC
Permalink
Anything is possible with enough code (well except automating the drawing
manager <wink>)

You can access iProperties via VBA and then export them to an Excel sheet
and back again with no problems. For some sample code see

http://www.sdotson.com/vba/excelimportexport.zip
--
Sean Dotson, PE (AICE)
RND Automation & Engineering
sdotson.com mcadforums.com
Post by Calimesa
Sanjay,
I don't mean the parameters. I mean iproperties such as date, design
status...
Thanks.
Post by Sanjay Ramaswamy (Autodesk)
Checking the 'Export Parameter' flag in the parameters dialog for a
parameter will create a file property for the parameter in the custom
property set. This can be achieved by setting the
Parameter.ExposedAsProperty property to True in the API.
Sanjay-
Post by Calimesa
I might be wrong but am not sure you can do that. Anyone?
Post by lcreasy1
Hello.
How would I link the iProperties of an Inventor Part, Assembly, or
Drawing
Post by Calimesa
file to an excel file so that when I open, change, and save an excel
file,
Post by Sanjay Ramaswamy (Autodesk)
Post by Calimesa
the fields of the iProperties for the various files are changed as well?
I
Post by Calimesa
have been able to "Link" the excel to the user parameters, but I can't
import them into the iProperties. Any ideas?
Calimesa
2005-03-08 15:13:51 UTC
Permalink
Sean,
Your code works great for exporting parameters and text to an excel
spreadsheet. If I want to import information such as Part Number, Customer
Name, WorkOrder etc from an excel spreadsheet to Inventor's custom
properties.
Thanks.
Post by Sean Dotson
Anything is possible with enough code (well except automating the drawing
manager <wink>)
You can access iProperties via VBA and then export them to an Excel sheet
and back again with no problems. For some sample code see
http://www.sdotson.com/vba/excelimportexport.zip
--
Sean Dotson, PE (AICE)
RND Automation & Engineering
sdotson.com mcadforums.com
Post by Calimesa
Sanjay,
I don't mean the parameters. I mean iproperties such as date, design
status...
Thanks.
Post by Sanjay Ramaswamy (Autodesk)
Checking the 'Export Parameter' flag in the parameters dialog for a
parameter will create a file property for the parameter in the custom
property set. This can be achieved by setting the
Parameter.ExposedAsProperty property to True in the API.
Sanjay-
Post by Calimesa
I might be wrong but am not sure you can do that. Anyone?
Post by lcreasy1
Hello.
How would I link the iProperties of an Inventor Part, Assembly, or
Drawing
Post by Calimesa
file to an excel file so that when I open, change, and save an excel
file,
Post by Sanjay Ramaswamy (Autodesk)
Post by Calimesa
the fields of the iProperties for the various files are changed as
well?
Post by Calimesa
Post by Sanjay Ramaswamy (Autodesk)
I
Post by Calimesa
have been able to "Link" the excel to the user parameters, but I can't
import them into the iProperties. Any ideas?
Sean Dotson
2005-03-15 18:23:09 UTC
Permalink
This code should be a good starting point. Just need to reference the
properties (see my site for a tutorial on this) and write them from Excel to
IV.
--
Sean Dotson, PE (AICE)
RND Automation & Engineering
www.sdotson.com
www.mcadforums.com
Post by Calimesa
Sean,
Your code works great for exporting parameters and text to an excel
spreadsheet. If I want to import information such as Part Number, Customer
Name, WorkOrder etc from an excel spreadsheet to Inventor's custom
properties.
Thanks.
Post by Sean Dotson
Anything is possible with enough code (well except automating the drawing
manager <wink>)
You can access iProperties via VBA and then export them to an Excel sheet
and back again with no problems. For some sample code see
http://www.sdotson.com/vba/excelimportexport.zip
--
Sean Dotson, PE (AICE)
RND Automation & Engineering
sdotson.com mcadforums.com
Post by Calimesa
Sanjay,
I don't mean the parameters. I mean iproperties such as date, design
status...
Thanks.
Post by Sanjay Ramaswamy (Autodesk)
Checking the 'Export Parameter' flag in the parameters dialog for a
parameter will create a file property for the parameter in the custom
property set. This can be achieved by setting the
Parameter.ExposedAsProperty property to True in the API.
Sanjay-
Post by Calimesa
I might be wrong but am not sure you can do that. Anyone?
Post by lcreasy1
Hello.
How would I link the iProperties of an Inventor Part, Assembly, or
Drawing
Post by Calimesa
file to an excel file so that when I open, change, and save an excel
file,
Post by Sanjay Ramaswamy (Autodesk)
Post by Calimesa
the fields of the iProperties for the various files are changed as
well?
Post by Calimesa
Post by Sanjay Ramaswamy (Autodesk)
I
Post by Calimesa
have been able to "Link" the excel to the user parameters, but I
can't
Post by Sean Dotson
Post by Calimesa
Post by Sanjay Ramaswamy (Autodesk)
Post by Calimesa
import them into the iProperties. Any ideas?
lcreasy1
2005-03-08 21:47:31 UTC
Permalink
Do you have anything for regular VB that I could use?
Sean Dotson
2005-03-15 18:23:27 UTC
Permalink
VBA is a subset of VB. The code should be easily transferable.
--
Sean Dotson, PE (AICE)
RND Automation & Engineering
www.sdotson.com
www.mcadforums.com
Post by lcreasy1
Do you have anything for regular VB that I could use?
Calimesa
2005-03-08 14:57:35 UTC
Permalink
When you link an inventor file to an excel spreadsheet, the first sheet is
automatically linked to the inventor file. Is there a way to link to 2nd or
3rd sheet
thanks
Post by Calimesa
Sanjay,
I don't mean the parameters. I mean iproperties such as date, design
status...
Thanks.
Post by Sanjay Ramaswamy (Autodesk)
Checking the 'Export Parameter' flag in the parameters dialog for a
parameter will create a file property for the parameter in the custom
property set. This can be achieved by setting the
Parameter.ExposedAsProperty property to True in the API.
Sanjay-
Post by Calimesa
I might be wrong but am not sure you can do that. Anyone?
Post by lcreasy1
Hello.
How would I link the iProperties of an Inventor Part, Assembly, or
Drawing
Post by Calimesa
file to an excel file so that when I open, change, and save an excel
file,
Post by Sanjay Ramaswamy (Autodesk)
Post by Calimesa
the fields of the iProperties for the various files are changed as well?
I
Post by Calimesa
have been able to "Link" the excel to the user parameters, but I can't
import them into the iProperties. Any ideas?
Teun Ham (IV9 SP2)
2005-03-08 08:32:20 UTC
Permalink
Use the "Workbook_BeforeSave" within Excel, this will work like an AutoSave.

Within this sub, you should connect to a running session of Inventor (or
create a new instance when Inventor is not running).
Then, you can update the iProperties of your Part/IDW/IAM.
Loading...