Looking For Ways To Suppress Leaders & Dimensions Dynamically Using iLogic Rules

Looking For Ways To Suppress Leaders & Dimensions Dynamically Using iLogic Rules

V_L_F
Enthusiast Enthusiast
1,403 Views
7 Replies
Message 1 of 8

Looking For Ways To Suppress Leaders & Dimensions Dynamically Using iLogic Rules

V_L_F
Enthusiast
Enthusiast

Greetings everyone,

 

I've done a lot of hunting around, and I can't seem to find any other posts regarding my issue.  I'm hoping to get some clarification regarding whether or not I'm going about this problem the right way.

 

I apologize in advance for the long explanation.  I'm a newbie to this community, and I'm still learning the jargon of this particular crowd.  Please be gentle.

 

I'm working for a company that manufactures large curtain wall unit assemblies; a fellow CAD tech and I are tasked with the job of creating Inventor assembly models & drawings of the crates that are used to ship said unit assemblies.  I've recently taught myself how to use Inventor's iLogic features to create a fully-automated crate model generator.  This is only the first half of my battle - I want to come up with a way to streamline the shop drawing process, as well.

 

The crate models come in varying sizes with some sets of components appearing or becoming suppressed based on the number of unit assemblies that the crate model is intended to hold.  There are 2 key features of this crate model that pertain to my issue - the number of unit assemblies it holds (1-4 max), and the number of vertical "rings" present in the assembly model.

 

The crate models are designed to hold 1-4 unit assemblies of varying sizes.  The number of vertical "rings" along the crate's length will vary from 2-4 rings, depending on how long the crate needs to be to house the unit assemblies.

 

When it comes to making a template shop drawing for such an amorphous beast, there are a number of components that can vanish if the crate specs aren't set to their max (i.e. 4 unit assemblies & 4 vertical rings).  If I create a drawing of the crate model at max settings, I can create my views, add dimensions, and use leader text elements to call out each piece of lumber (which in turn specifies its profile & length via its part number).

 

My problem is this - if I update the crate model to have less than 4 unit assemblies on it, and it has less than 4 vertical rings, some of the leader arrows on the drawing are going to be pointing at empty space and will turn that angry magenta color because the connectivity is now lost.  In some cases, some leaders will disappear entirely because of the suppression of their designated component(s).

 

Is there a way to perhaps use iLogic rules to suppress certain leaders & dimensions and "unsuppress" other leaders & dimensions based on the number of these key features that are present in the crate model?  The easiest (though tedious) approach to this problem would be to have a different set of leaders & dimensions for each combination of unit assemblies & vertical rings present in the assembly model.  If there's a better way to go about this problem, though, I'm certainly open to suggestions.

 

Thanks in advance for your time, guys.  I hope to hear from you soon!

 

- Sincerely,

Vinny

0 Likes
Accepted solutions (1)
1,404 Views
7 Replies
Replies (7)
Message 2 of 8

V_L_F
Enthusiast
Enthusiast

Okay, I'm gonna presume that perhaps I've posted this in the wrong forum.  Sorry, all.  I'll try inquiring elsewhere.

0 Likes
Message 3 of 8

rikard.nilsson
Collaborator
Collaborator
Accepted solution
Hi,

This is the right forum for this question.
You have found the biggest problem when it comes to dimensions.
There is no way to get the dimension to come back after changing from 4 to 2 and then back to 4 again.

As I can see it there is one way to solve this.
If you create the dimension dynamically with API coding inside s rule so you place new dimensions every time. Place the dimensions to workooints. It's the easiest way.
Place the leaders in the same way.

/Rikard
Message 4 of 8

V_L_F
Enthusiast
Enthusiast
Ah, thanks Rikard. I really appreciate the response. Go figure that I've tripped over one of the biggest problems of Inventor in my quest to streamline my work process. Well, perhaps I should take some solace in knowing that this is possibly a job security blessing in disguise. =P

I'll start looking into Inventer API on Monday when I'm back in the office. Would you happen to have any recommendations on where a newbie should start looking into creating new dimensions via rules and work points? If not, I'm sure that I'll eventually figure it out.

Thanks again for clearing the air of my uncertainties, Rikard! Have a great weekend!

- Vinny
0 Likes
Message 5 of 8

rikard.nilsson
Collaborator
Collaborator
🙂

I'm pretty sure you will find examples in the API help or in this group.

I also think you should place the dimension on a specific style or layer. So you can delete them before you place new ones.

/Rikard
0 Likes
Message 6 of 8

rikard.nilsson
Collaborator
Collaborator
🙂

I'm pretty sure you will find examples in the API help or in this group.

I also think you should place the dimension on a specific style or layer. So you can delete them before you place new ones.

/Rikard
0 Likes
Message 7 of 8

D0UGLAS
Collaborator
Collaborator

I was searching for something else and came across your problem, if you are still searching here's another method.

 

I know what you are trying to do can be done with ilogic and layers.

 

Use ilogic rules to turn on and off layers of text and or dimensions.

 

example: ilogic

 

Dim modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)

 

Select Case True

Case Parameter(modelName,"Param01") + Parameter(modelName,"Param02") = 0 mm And Parameter(modelName,"Param03") = False
ThisDrawing.Document.StylesManager.Layers("Dims01").Visible = False
ThisDrawing.Document.StylesManager.Layers("Text01").Visible = False
ThisDrawing.Document.StylesManager.Layers("Lotsofnotes01").Visible = False


Case Parameter(modelName,"Param01") + Parameter(modelName,"Param02") <> 0 mm And Parameter(modelName,"Param03") = False
ThisDrawing.Document.StylesManager.Layers("Dims01").Visible = False
ThisDrawing.Document.StylesManager.Layers("Text01").Visible = True
ThisDrawing.Document.StylesManager.Layers("Lotsofnotes01").Visible = True

 

Case Parameter(modelName,"Param01") + Parameter(modelName,"Param02") <> 0 mm And Parameter(modelName,"Param03") = True
ThisDrawing.Document.StylesManager.Layers("Dims01").Visible = True
ThisDrawing.Document.StylesManager.Layers("Text01").Visible = True
ThisDrawing.Document.StylesManager.Layers("Lotsofnotes01").Visible = False

 

End Select

 

 

The orphaned dimensions and text are hidden when not needed and are re-established for the correct cases.

 

 

 

Message 8 of 8

skull
Contributor
Contributor

This solution works perfectly. Previously the only option I saw was deleting dimensions, but I didn't want to loose these dims. This method works perfectly.

 

Thanks!