VBA make simple part completely from VBA.

VBA make simple part completely from VBA.

rcolon9E4ZX
Advocate Advocate
1,044 Views
4 Replies
Message 1 of 5

VBA make simple part completely from VBA.

rcolon9E4ZX
Advocate
Advocate

Hey guys. 

 

I about to undertake a project that will create parts based on user inputs. The hope is to do it from scratch, via vba or iLogic, and without needing a template already made.

 

Could someone post sample VBA code for the creation of this simple block. Module run from brand new Inventor window. This would help greatly with learning syntax and how to manipulate part documents.

 

Simple Block.png

 

Also, if there is a better way to automate creation of part documents and features without needing a template/part already made, please let me know.

 

Any help would be greatly appreciated.

 

0 Likes
Accepted solutions (1)
1,045 Views
4 Replies
Replies (4)
Message 2 of 5

Owner2229
Advisor
Advisor

Hey, look in the Inventor API Help and search for "extrude", it will give you some samples to start with.

 

Remember you have to create the code for every part-type.

So, the best approach is to create the code "templates" for all the unique part shapes you need, let the user select the shape (optimaly by pre-rendered pictures, which can be included in your AddIn or stored somewhere on your server/local disc) and promt him for dimensions, file name, part number, file location and whatever else you need, it can be all in one dialog (form).

Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods
0 Likes
Message 3 of 5

rcolon9E4ZX
Advocate
Advocate

I had checked for this a while ago and couldn't find any examples. If you provide the steps for accessing this example, I'd be happy to accept as solution. (From within Inventor?/Ribbon tabs/etc.) This would be very useful for me when using other objects and methods.

 

Thank you.

0 Likes
Message 4 of 5

rcolon9E4ZX
Advocate
Advocate

Also, I am using Inventor 2017.

0 Likes
Message 5 of 5

Anonymous
Not applicable
Accepted solution

Access the API Help from within Inventor by clicking the (?) See image below.

Help.png

 

Click the Search Tab and search for extrude.

Search.png