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: 

Controlling 'Break' Size using iLogic

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
1593 Views, 4 Replies

Controlling 'Break' Size using iLogic

Hello,

 

I have an assembly drawing which requires a break in the drawing view due to its height. The drawing view scales accoring to the change in height (so it remains the same physical height on the drawing), however I need to be able to increase/decrease the height (or value) of the break linearly to the height of the assembly.  

 

Is there anyway i can do this? I had a look at the ilogic 'break sample' and tried to adapt it to my needs, however, i couldnt get it working. I am using Inventor 2012.

 

Any help or advice is appreciated,

Many Thanks

Tags (2)
4 REPLIES 4
Message 2 of 5
MjDeck
in reply to: Anonymous

Here's a more general version of the view break rule.  It can create a horizontal or vertical break.  It does not have to read a parameter from the model: it reads the model extents.
 There are a few edits to make to customize this rule for your model and drawing:

If your model is longest in the Y direction and your view is laid out with Y being the longest direction, then this rule should work for you.  If not, you can change the lines:
Dim viewDir As Integer = 1
and/or
Dim modelSize As Double = GetExtents(viewL.ModelDocument, 1) ' 0 for the X extents of the model, 1 for Y, 2 for Z

Change the line:
If (modelSize < 12) Then Return
and also the line:
Dim breakWidth As Double = (modelSize - 10) * 2.54 * view.Scale ' * 0.1 instead of * 2.54 if the model is in millimeters
to reflect the minimum model size for which you need a view break.


Mike Deck
Software Developer
Autodesk, Inc.

Message 3 of 5
Anonymous
in reply to: MjDeck

Thanks for the code Mike! Modified it slightly to suit my drawing and it works great.

 

One small problem i did encounter was that upon introducing the break, an angular dimension (45deg) i had placed on the drawing switched quadrants to show 135deg. Is there any way i can fix the dimension in a particular quadrant?

 

Other than that, Im moving onto the next assembly which requires 'breaks' in the X & Y directions simultaneiously, shouldnt be a problem but i'll post here if I do run into trouble with it.

 

Much appreciated & Many Thanks

Message 4 of 5
MjDeck
in reply to: Anonymous

I see the problem with angular dimensions.  I made a change to the rule so it will edit an existing break operation instead of deleting and recreating it.  But that doesn't fix the problem.  I'll keep looking at it.


Mike Deck
Software Developer
Autodesk, Inc.

Message 5 of 5
Anonymous
in reply to: MjDeck

Thanks Mike,

 

I appreciate your input; if you do come across a fix for that particular problem, please do let me know.

 

Many Thanks

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

Post to forums  

Autodesk Design & Make Report