Inventor General Discussion

Reply
Distinguished Contributor
wseaston
Posts: 204
Registered: ‎03-04-2009
Message 1 of 5 (2,174 Views)

Select All - Faces

2174 Views, 4 Replies
05-25-2011 05:17 AM

Hi There,

 

I am working with a model which has all the faces colour properties set to "default". If I change the material of the model, the faces obviously don't change. Is there a way I can select all the faces at once to change the face colour property to "as body".

 

Currently I can only select one face at a time.

 

Thanks

Mentor
alewer
Posts: 189
Registered: ‎08-15-2006
Message 2 of 5 (2,163 Views)

Re: Select All - Faces

05-25-2011 07:16 AM in reply to: wseaston

I don't know of any way without a macro.  Try the following:

 

Public Sub AllFacesAsPartRenderStyle()
    Dim oPartDocument As Inventor.PartDocument
    Set oPartDocument = ThisApplication.ActiveDocument
    
    Dim oCompDef As Inventor.ComponentDefinition
    Set oCompDef = oPartDocument.ComponentDefinition
    
    Dim oSBodies As Inventor.SurfaceBodies
    Set oSBodies = oCompDef.SurfaceBodies
    
    Dim oSBody As Inventor.SurfaceBody
    Dim oFace As Inventor.Face
    
    For Each oSBody In oSBodies
        For Each oFace In oSBody.Faces
            oFace.SetRenderStyle kBodyRenderStyle
        Next oFace
        
        oSBody.SetRenderStyle kPartRenderStyle
    Next oSBody
End Sub

 

Valued Contributor
Loren_J
Posts: 90
Registered: ‎09-10-2010
Message 3 of 5 (2,147 Views)

Re: Select All - Faces

05-25-2011 09:16 AM in reply to: wseaston

Expand the Solid Bodies folder, right-click on the solid and select Properties. You can set the color style for the whole body.

LorenJ

Inventor 2011 Pro
Win7 64 SP1
Xeon W3550 @3.07 GHz
ATI FirePro V5700, 8.773.0.0
12 GB RAM
Mentor
alewer
Posts: 189
Registered: ‎08-15-2006
Message 4 of 5 (2,143 Views)

Re: Select All - Faces

05-25-2011 09:34 AM in reply to: Loren_J

Loren_J wrote:

Expand the Solid Bodies folder, right-click on the solid and select Properties. You can set the color style for the whole body.


Your post jogged my memory, but you missed one detail:  you also have to select "Strip Overrides" when editing the body properties.  But your solution is less troublesome than my macro for a one-off fix.  I use the macro quite a lot because I have to deal with a lot of imported parts that always seem to have this problem, and I can run the macro with a single click (I've added my own button).
Distinguished Contributor
wseaston
Posts: 204
Registered: ‎03-04-2009
Message 5 of 5 (2,125 Views)

Re: Select All - Faces

05-25-2011 11:22 PM in reply to: Loren_J

"Expand the Solid Bodies folder, right-click on the solid and select Properties. You can set the color style for the whole body."

 

Thanks, but I have already tried this an it did not work as expected. I have found that if I select individual faces RMB, select properties, the faces colour shows up as default instead of as part or as body. If I set the face properties to one of these, the colour is then as per the material colour style.

 

I have further found that if I follow the procedure as you suggested after I have set some of the faces to "as part" they revert back to default....

 

Cheers

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!