Inventor Customization

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

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

386 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 (386 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 (386 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
|

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube