Creation sketch with VBA iLogic

Creation sketch with VBA iLogic

jeeva.scientist
Enthusiast Enthusiast
3,451 Views
27 Replies
Message 1 of 28

Creation sketch with VBA iLogic

jeeva.scientist
Enthusiast
Enthusiast

1) Creating a sketch with construction lines. The parameters are "circle_small" , "circle_large" and "c2c".
sketch creation with Hidden linessketch creation with Hidden lines

 2) Now chords are drawn by using the previous sketch as the path. In the end, there will be a gap which is to be filled with the same chord. now the "c2c" dimension can be converted into a driven dimension.

chord drawin with certain dimension along the path of the sketchchord drawin with certain dimension along the path of the sketch

 3) The gap in the previous sketch is filled with a chord by converting the "c2c" as driven dimension.

gap in the previous sketch is filled with the same chord length by changing the "c2c" as driven dimensiongap in the previous sketch is filled with the same chord length by changing the "c2c" as driven dimension

 

how to create this using iLogic VBA?

Input Dimension

circle_small

circle_large

c2c

chord

 

Changes

c2c can be converted into the driven dimension to adjust the gap.

 

Can anyone help me with the program?

 

I have attached my part file.

kindly find the attachments, thanks.

 

Inventor Version 2020

 

0 Likes
Accepted solutions (2)
3,452 Views
27 Replies
Replies (27)
Message 21 of 28

jeeva.scientist
Enthusiast
Enthusiast
Accepted solution

I have attached the Working part for future reference. I used the numerical method to solve the problem.

But Still, I want to assemble a chain with two different links this will only be possible if we could create a sketch-like this,

Untitled.png

 

kindly take a look at the working model of fully parametric bucket assembly.

if anyone have any suggestion please let me know, thanks for your time. 

Attachment detail: Autodesk Inventor 2015

 

0 Likes
Message 22 of 28

Sergio.D.Suárez
Mentor
Mentor

@jeeva.scientist  ha escrito:

Hello Mr.Serigo,

Thanks for your response, I have considered your suggestion of using "linear and circular pattern". There is no issue in using the "linear pattern" but, when we use "circular pattern" while giving the distance between two instances, which in our case is the pitch. In a "circular pattern", the pitch distance is considered as an arc length, not as a chord length. so the chain link will interfere with one another it will not be accurate.


Hi, what you said is a mistake. In a circular pattern the separation between instances is carried out through a total angle and a number of instances, you have the length of the circular rope, which in this case is your pitch, also has the radius of the circle, then you can create a triangle with the two radial lines and with the
circular rope Now you will get the searched angle by instance. Since you have an arc for your chain, you can place a reference dimension that measures your total angle inscribed in your arc. Now you must calculate how many circular instances enter this arc, dividing this total angle by the angle of the instance, this number will be decimal, you must round it down to get an integer. Then you will multiply this number of instances by your instance angle to get the real total angle encompassed by the n instances.
It is an arduous process, but it will provide the solution to your problem.
 If you can access any machine with Inventor 2018, take a look at the file that I have attached above, I think it could be very useful. Regards


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes
Message 23 of 28

Sergio.D.Suárez
Mentor
Mentor

@jeeva.scientist  ha escrito:

Hello Mr.Serigo,

Thanks for your response, I have considered your suggestion of using "linear and circular pattern". There is no issue in using the "linear pattern" but, when we use "circular pattern" while giving the distance between two instances, which in our case is the pitch. In a "circular pattern", the pitch distance is considered as an arc length, not as a chord length. so the chain link will interfere with one another it will not be accurate.

 

How can I solve that problem?

I’m eager to receive your feedback, thanks.


Hi, what you said is a mistake. In a circular pattern the separation between instances is carried out through a total angle and a number of instances, you have the length of the circular rope, which in this case is your pitch, also has the radius of the circle, then you can create a triangle with the two radial lines and with the
circular rope Now you will get the searched angle by instance. Since you have an arc for your chain, you can place a reference dimension that measures your total angle inscribed in your arc. Now you must calculate how many circular instances enter this arc, dividing this total angle by the angle of the instance, this number will be decimal, you must round it down to get an integer. Then you will multiply this number of instances by your instance angle to get the real total angle encompassed by the n instances.
It is an arduous process, but it will provide the solution to your problem.
 If you can access any machine with Inventor 2018, take a look at the file that I have attached above, I think it could be very useful. Regards


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes
Message 24 of 28

jeeva.scientist
Enthusiast
Enthusiast

There is no attachment. could you attach it again please, thanks?

0 Likes
Message 25 of 28

is it possible to see the souce code that you made ? want to leard how you did that ?.. and I want to leard form other people code 🙂 

0 Likes
Message 26 of 28

Hi,

 

in message 20 I posted a part.

in it is a sketch and some iLogic code.

does that help you?

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 27 of 28

well no.. because when I try to open it .. it does not open but create a new file.... and I can´t find the ilogic code in this new file. so can´t see your code

0 Likes
Message 28 of 28

Sergio.D.Suárez
Mentor
Mentor

 

In some older comments on this thread, I shared a version of the chain project. This is the oldest version file I have found. I think it's version 2017.

It is from my beginnings in inventor, surely there will be many improvements to make it, just take an idea of the project.
I hope it gives you some way to the solution. Regards


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes