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: 

Automated section view through each type of hole

0 REPLIES 0
Reply
Message 1 of 1
ralfmja
72 Views, 0 Replies

Automated section view through each type of hole

Hi,

 

I have a problem that I'm considering if it's possible to solve using iLogic. 🙂

 

I have a view with holes, and there's always a holes table associated with this view. In this case, my approach is to create a section through the centers of all TYPES of holes using the section tool.To illustrate what I mean, below is a video of my standard procedure:

 

 

section.png

And now I would like to automate this process, that is, for a view named "VIEW1," create such a section as I described.

It seems to me that we should approach the issue in the following way:

1.Based on the holes table, determine how many types of holes we have (e.g., using the DESCRIPTION column).

2.For each type of hole (within the same description), determine the point that has the minimum X coordinate (with the condition that each subsequent X must be at least R + 1mm larger, as otherwise creating a perpendicular line to the next hole center won't be possible).

3.If we have as many X values as types of holes, and they meet the condition that each subsequent one is larger than the previous one by at least R+1, then we have the coordinates of the hole centers. Each X corresponds to a Y value in the table.

4. We still need the starting and ending points, which, as it seems to me, could be determined as follows:

  • For the starting point (left one):

    • X would be the value of the leftmost point on the drawing, minus a certain value (e.g., 2).
    • Y would be the Y value for the first hole center.
  • Similarly, for the ending point (right one):

    • X would be the value of the leftmost point X plus the width of the view, plus a certain value (e.g., 2).
    • Y would be the Y value for the last hole center obtained.

5.Once we have these points determined, we generate lines from the starting point through the first hole to the point (X+R+1,Y). Then, we draw perpendicular lines from that point to the next point (X1+R+1;Y1) and from there to the next point (X2-R-1;Y2), and so on.

 

My question is whether what I wrote makes sense and is it possible to translate it into rule code? The challenge will likely be determining the center points of the holes in such a way that the X coordinate is always sorted from the smallest to the largest, taking into account the type of holes. Additionally, dealing with the fact that sometimes some of them are singular, so it's not possible to determine another X (these would be dominant holes)

 

Has anyone done something similar and has a ready recipe?

 

Thanks in advance,

Regards,

ralfmja

0 REPLIES 0

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report