Inventor General Discussion

Inventor General Discussion

Reply
New Member
EmpireBuff
Posts: 2
Registered: ‎11-08-2006
Message 1 of 17 (308 Views)

Use filename as parameter

308 Views, 16 Replies
11-08-2006 03:14 PM
Is there a way to use the filename to drive the parameters of the file?

Example: I have a cube that is called 4x4x4.ipt its dimensions d0,d1,d2 are 4,4,4 respectively. I want to rename it to 4x4x6.ipt and have the dimensions d0,d1,d2 resize to 4,4,6.

Thanks
Distinguished Contributor
shekarsub[Autodesk]
Posts: 2,198
Registered: ‎05-09-2005
Message 2 of 17 (309 Views)

Re: Use filename as parameter

11-08-2006 06:41 PM in reply to: EmpireBuff
Option 1: Through VB code read the filename and parse it and then set it to the parameters d0,d1,d2 and update. autodesk.inventor.customization group could provide more help here.

Option 2: You might be knowing this already you can create an iPart with d0,d1,d2 as columns and then create keys for them and then see if that works out. You could add rows for as many variations as possible. This does create files though.

Thanks

shekar
*Teun Ham \(IV10 SP3\)
Message 3 of 17 (310 Views)

Re: Use filename as parameter

11-09-2006 12:28 AM in reply to: EmpireBuff
Free of charge ;-)

--
T. Ham
Mechanical Engineer
CDS Engineering BV

HP xw4300 Workstation
Dual Pentium XEON 3.6 Ghz
4 GB SDRAM
NVIDIA QUADRO FX 3450/4000 SDI (Driver = 8.4.2.6)
250 GB SEAGATE SATA Hard Disc
3Com Gigabit NIC

Windows XP Professional SP2
Autodesk Inventor Series 10 SP3a
--
Distinguished Contributor
stee
Posts: 1,535
Registered: ‎01-02-2006
Message 4 of 17 (310 Views)

Re: Use filename as parameter

11-09-2006 12:33 AM in reply to: EmpireBuff
option 3 get a copy of yippee pro.

use the parameters to drive the filename
*Teun Ham \(IV10 SP3\)
Message 5 of 17 (310 Views)

Re: Use filename as parameter

11-09-2006 01:01 AM in reply to: EmpireBuff
The only problem...he wants it the other-way-around :-)

--
T. Ham
Mechanical Engineer
CDS Engineering BV

HP xw4300 Workstation
Dual Pentium XEON 3.6 Ghz
4 GB SDRAM
NVIDIA QUADRO FX 3450/4000 SDI (Driver = 8.4.2.6)
250 GB SEAGATE SATA Hard Disc
3Com Gigabit NIC

Windows XP Professional SP2
Autodesk Inventor Series 10 SP3a
--
Distinguished Contributor
stee
Posts: 1,535
Registered: ‎01-02-2006
Message 6 of 17 (310 Views)

Re: Use filename as parameter

11-09-2006 01:23 AM in reply to: EmpireBuff
some say tomato, some say tomato, wait that doesnt work here...

i really should think about learning some code, nice work
Distinguished Contributor
shekarsub[Autodesk]
Posts: 2,198
Registered: ‎05-09-2005
Message 7 of 17 (310 Views)

Re: Use filename as parameter

11-09-2006 02:19 AM in reply to: EmpireBuff
For those of you who are curious how Teun did it he used Option 1. When you open the IPT file attached by Teun go to Tools, Macro, Visual Basic Editor to see the script that will be run when the file is opened. Nice job Teun. Thanks.

shekar
*Teun Ham \(IV10 SP3\)
Message 8 of 17 (310 Views)

Re: Use filename as parameter

11-09-2006 02:49 AM in reply to: EmpireBuff
One remark: the macro is embedded in the IPT. This can cause problems when
you have a lot of IPTs open at the same time (it's a VBA limitation, so you
can blame Microsoft for it)

An Add-in would solve that problem, but my example is just to show that it
can be done!

Cheers,

--
T. Ham
Mechanical Engineer
CDS Engineering BV

HP xw4300 Workstation
Dual Pentium XEON 3.6 Ghz
4 GB SDRAM
NVIDIA QUADRO FX 3450/4000 SDI (Driver = 8.4.2.6)
250 GB SEAGATE SATA Hard Disc
3Com Gigabit NIC

Windows XP Professional SP2
Autodesk Inventor Series 10 SP3a
--
New Member
EmpireBuff
Posts: 2
Registered: ‎11-08-2006
Message 9 of 17 (310 Views)

Re: Use filename as parameter

11-09-2006 06:30 AM in reply to: EmpireBuff
You have all been very helpful, especially you Teun, I was trying to do this for a while now and only found out about this discussion group yesterday. My first experience has been very good !!!!

Cheers !!!
*Teun Ham \(IV10 SP3\)
Message 10 of 17 (310 Views)

Re: Use filename as parameter

11-09-2006 07:33 AM in reply to: EmpireBuff
No problem!

--
T. Ham
Mechanical Engineer
CDS Engineering BV

HP xw4300 Workstation
Dual Pentium XEON 3.6 Ghz
4 GB SDRAM
NVIDIA QUADRO FX 3450/4000 SDI (Driver = 8.4.2.6)
250 GB SEAGATE SATA Hard Disc
3Com Gigabit NIC

Windows XP Professional SP2
Autodesk Inventor Series 10 SP3a
--
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.