- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
I am about to embark on quite an ambitious project. I would like to write a VBA application (will later convert to plug-in, and ultimately and add-in) to generate the 3D models for a recurring project, but with different input parameters.
My customer builds a product (can't say more about that here), that consists of all manner of Inventor files (i.e. sheet metal parts, normal parts, weldments, sub-assemblies and ultimately a main assembly.
The product has about 12 different "standard" derivatives, but there are subtle changes from one project to the next within these derivatives.
Usually, once the product is modelled, the customer will make small changes that break away from his standard in order to save materials and various other reasons, so changes are inevitable, but they are usually fairly minor and can be controlled by using inventor parameters.
What I would like to do is the following. Using VBA generate a layout file that consists only of the skeletal model, but has all the parameters defining the product as user parameters. From there I want to flesh out and generate the 3D part, sheet metal etc. models by deriving this layout file into the individual parts and then inserting these parts back into the sub assembly files, weldment files and ultimately the final assembly file. I have done the project in this way manually in the past and it seems to be the best option.
At the moment I have a VBA macro written that is the start of the project. So far the macro creates some planes to use as sketch planes.
What I am struggling to figure out right now is; if I have created a plane using VBA macros using the "AddByPlaneAndOffset" method, (I have also created some user parameters), how do I determine the parameter name that is associated with the offset distance of that plane. Once I have this name, I want to edit the expression of that parameter (I think that's how it should be done) so that I can assign one of the user parameters to that model parameter. Ultimately, I would like to be able to "adjust" the position of any of the VBA created planes by changing the user parameters in the layout file.
It may be possible to solve this using iLogic, but somehow I have not had success with iLogic in the past for various reasons.
I have attached the VBA macro as it is at the moment for reference.
I know this is a long winded question / explanation, so thanks for taking the time to read through it.
Rob
-------------------------------------------
Windows 7 Pro (X64)
Intel(R) core (TM) i5-4690 CPU @ 3.50GHz
32.0 GB RAM
Nvidia Quadro K2000
Autodesk Inventor 2015 Professional Ultimate Design Suite
Solved! Go to Solution.