iLogic Rule to change Body Appearance of Solid Body

iLogic Rule to change Body Appearance of Solid Body

Anonymous
Not applicable
2,860 Views
4 Replies
Message 1 of 5

iLogic Rule to change Body Appearance of Solid Body

Anonymous
Not applicable

Hi All, 

 

  • I have modelled an upper cabinet with multiple solid bodies within the solid modelling environment of Inventor 2016.  See image below.
  • I am using an Excel spreadsheet to drive the model and it is working very well. 

Capture.JPG

 

  • Currently, I can turn "on and off" the visibility of the cabinet doors and switch from one a one door cabinet to a two door cabinet using the iLogic rule as shown below. I have abbreviated the rule for simplicity of posting on the forum. 

SyntaxEditor Code Snippet

If No_Of_Doors = 0 Then
    Feature.IsActive("Left Raised Panel Door Extrusion") = False
    Feature.IsActive("Right Raised Panel Door Extrusion") = False
    Feature.IsActive("Single Raised Panel Door Extrusion") = False
    End If
    
    If No_Of_Doors = 1 Then
    Feature.IsActive("Left Raised Panel Door Extrusion") = False
    Feature.IsActive("Right Raised Panel Door Extrusion") = False
    Feature.IsActive("Single Raised Panel Door Extrusion") = True
    End If
    
    If No_Of_Doors = 2 Then   
    Feature.IsActive("Left Raised Panel Door Extrusion") = True
    Feature.IsActive("Right Raised Panel Door Extrusion") = True
    Feature.IsActive("Single Raised Panel Door Extrusion") = False
    End If    

 

  • I am currently able to right click on the name of the solid body (ie. Left Raised Panel Door for example) in the browser window, select "Body Appearance" and then select "As Part"  to turn the colour of the door to gray, or select "Clear-Blue" to turn the colour fo the door to transoparent blue colour (as shown above).

 

Capture1.JPG

 

 

  • I would like to be able to toggle the Body Appearance of the cabinet doors from "As Part" to "Clear-Blue" by using an iLogic rule which is driven by an Excel parameter.
  • Is this is possible?
  • If so, would anyone be able to help me with the syntax of the iLogic rule?
  • Please go easy on me.  I am very new Inventor and my only experience so far with iLogic is to program a few rules to turn visibility of features on and off.
  • Thank you in advance for your help!

Don

0 Likes
2,861 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

Unfortuneatly I don't know the answer to your question but if your interested you might benifit from some training. Here's a couple links

 

TEDCF iLogic course

(there is a sample lesson but it early on so it might seem basic)

Amazon sale on course

(the photos on amazon might be more helpful)

0 Likes
Message 3 of 5

Anonymous
Not applicable
  • I have the entire TCDEF Inventor training series.
  • I am through about 1/3 of the Solid Modelling lessons and have not yet started the iLogic sessions.
  • Excellent training materials.
  • Does anyone know if it is possible to change the Body Appearance of a body using an iLogic rule?

 

Thanks in advance!

0 Likes
Message 4 of 5

Anonymous
Not applicable
Don,

Did you find a solution to this at all? I push Inventor to it's limits by building entire buildings in it! I model curtain wall facades and as part of keeping the full assembly light, i simplify each panel. Downside of this, the parts lose their appearance and i have to go into each one and change the appearance of the Solid Body. Very tedious!
0 Likes
Message 5 of 5

Curtis_Waguespack
Consultant
Consultant

@Anonymous @Anonymous

 

 

There are some examples here in case it's still of interest:

https://forums.autodesk.com/t5/inventor-forum/change-color-of-solidbody/m-p/7452625#M663148

 

Also just as a tip, you can search and ask programming questions of this type on the Inventor Customization forum too:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

0 Likes