Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

2 REPLIES 2
Reply
Message 1 of 3
avb
752 Views, 2 Replies

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

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
2 REPLIES 2
Message 2 of 3
Anonymous
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
Message 3 of 3
Anonymous
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
|

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report