Inventor Customization

Inventor Customization

Reply
Valued Contributor avb
Valued Contributor
avb
Posts: 56
Registered: ‎10-01-2003
Message 1 of 3 (408 Views)

Inventor/VBA/Select adjacent faces/Sketch orientation/Constrains/Holes

408 Views, 2 Replies
11-29-2001 04:51 PM
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.
It’s build from:
1. A Form called frmSlotGat
2. A module modSlotGat
3. A class module clsSelect
Sorry for the Dutch words, don’t 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
*Bliss, Charles
Message 2 of 3 (408 Views)

Re: Inventor/VBA/Select adjacent faces/Sketch orientation/Constrains/Holes

12-01-2001 12:38 AM in reply to: avb
The Form frmSlotGat which you posted fails to load correctly in VB /
VBA. I can see the code for it but not the dialog (object). I wonder
if this is a language translation issue.

avb wrote:

> 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.
> It’s build from:
> 1. A Form called frmSlotGat
> 2. A module modSlotGat
> 3. A class module clsSelect
> Sorry for the Dutch words, don’t 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
*Stobbeleir, Patrick de
Message 3 of 3 (408 Views)

Re:

12-01-2001 06:57 AM in reply to: avb
I did get the same error, the problem is that in VBA a form consist of 2
files with the extension frm and frx (I think the frx file is compiled or
just binary) so Anton could you post the frx file as well!



"Charles Bliss" wrote in message
news:3C090793.7C7C59EF@cbliss.com...
| The Form frmSlotGat which you posted fails to load correctly in VB /
| VBA. I can see the code for it but not the dialog (object). I wonder
| if this is a language translation issue.
|
| avb wrote:
|
| > 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.
| > It's build from:
| > 1. A Form called frmSlotGat
| > 2. A module modSlotGat
| > 3. A class module clsSelect
| > Sorry for the Dutch words, don't 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
|
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.