Message 1 of 3
Inventor/VBA/Select adjacent faces/Sketch orientation/Constrains/Holes

Not applicable
11-29-2001
04:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This is my VBA example build for Inventor 5/Sp0.
specially posted for Charles Bliss and Patrick de Stobbeleir. I post this in a separate Topic so anyone can find it back easily.
To avoid risks for virus, I post this example as text, not as a project see CF.
Its build from:
1. A Form called frmSlotGat
2. A module modSlotGat
3. A class module clsSelect
Sorry for the Dutch words, dont know the translations for these words.
Usage:
Start Inventor
Open Partfile plank.ipt
Tools>Macro>Visual Basic Editor
File>Import File, select frmSlotGat.frm
File>Import File, select modSlotGat.bas
File>Import File, select clsSlotGat.cls
Go to the Part View in Inventor
Tools>Macro>Macro , select testMe
And finally for those who are VB(A) starters I would recommend the site of Randall Rath http://www.vbdesign.net/cadpages/
It's focussed on AutoCAD, but the basic principles are the same.
Now some explanations to the VBA example.
The purpose is to build two holes in adjacent faces of a peace of wood. It's part of a cupboard. To get this done these are the steps to be taken:
1. Get three adjacent faces ( infact a corner)
2. Position two sketches with the X and Y axes pointing in the material directions
3. Constrain the Sketches to each other (Project items)
4. Dimension the distances to the sides
5. Build the Holes (use depth to next for hole 2)
Anton
specially posted for Charles Bliss and Patrick de Stobbeleir. I post this in a separate Topic so anyone can find it back easily.
To avoid risks for virus, I post this example as text, not as a project see CF.
Its build from:
1. A Form called frmSlotGat
2. A module modSlotGat
3. A class module clsSelect
Sorry for the Dutch words, dont know the translations for these words.
Usage:
Start Inventor
Open Partfile plank.ipt
Tools>Macro>Visual Basic Editor
File>Import File, select frmSlotGat.frm
File>Import File, select modSlotGat.bas
File>Import File, select clsSlotGat.cls
Go to the Part View in Inventor
Tools>Macro>Macro , select testMe
And finally for those who are VB(A) starters I would recommend the site of Randall Rath http://www.vbdesign.net/cadpages/
It's focussed on AutoCAD, but the basic principles are the same.
Now some explanations to the VBA example.
The purpose is to build two holes in adjacent faces of a peace of wood. It's part of a cupboard. To get this done these are the steps to be taken:
1. Get three adjacent faces ( infact a corner)
2. Position two sketches with the X and Y axes pointing in the material directions
3. Constrain the Sketches to each other (Project items)
4. Dimension the distances to the sides
5. Build the Holes (use depth to next for hole 2)
Anton