3D model (sheet metal) features appearance with iLogic

3D model (sheet metal) features appearance with iLogic

gregor.strehar
Explorer Explorer
855 Views
3 Replies
Message 1 of 4

3D model (sheet metal) features appearance with iLogic

gregor.strehar
Explorer
Explorer

Hi guys,

 

is it possible to override appearance of sheet metal feature (bend) using iLogic?

 

Posnetek zaslona 2021-04-26 204448.png

 

"Normal" features like Flange, Face, ... is not a problem, but those sub-features?

Or is there a better way how to paint it with iLogic (surface painting, not material/solid).

 

Did search quite a bit on the forum, but with no luck so far.

 

Best regards,

 

Gregor

 

 

 

0 Likes
Accepted solutions (1)
856 Views
3 Replies
Replies (3)
Message 2 of 4

Ralf_Krieg
Advisor
Advisor
Accepted solution

Hello

 

You can assign the appearance to bends (also as part of a contour flange) like this. The flat pattern will also be colored with this appearance. What do you want to achive with this coloring?

Dim sAppearanceName As String = "Titan"   '<-- Change this name

Dim oDoc As PartDocument= ThisApplication.ActiveDocument
Dim oCompDef As SheetMetalComponentDefinition = oDoc.ComponentDefinition
Dim oFeatures As SheetMetalFeatures = oCompDef.Features
Dim oAssetLib As AssetLibrary = ThisApplication.ActiveAppearanceLibrary

Dim oLocalAsset As Asset
For Each oLocalAsset In oDoc.AppearanceAssets
    If oLocalAsset.DisplayName = sAppearanceName Then Exit For
Next

Dim oAsset As Asset
If oLocalAsset Is Nothing Then
    For Each oAsset In oAssetLib.AppearanceAssets
        If oAsset.DisplayName = sAppearanceName Then
            oLocalAsset = oAsset.CopyTo(oDoc)
            Exit For
        End If
    Next
End If

Dim oBendFeature As BendFeature
For Each oBendFeature In oFeatures.BendFeatures
    oBendFeature.Appearance = oAsset
Next

Dim oContourFlangeFeature As ContourFlangeFeature
For Each oContourFlangeFeature In oFeatures.ContourFlangeFeatures
    oContourFlangeFeature.BendFeature.Appearance = oLocalAsset
Next

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 3 of 4

gregor.strehar
Explorer
Explorer

Hi there!

 

thanks for reply.

I do use this lines to paint the rest:

	Dim oFet As PartFeature
	For Each oFet In oPartDef.Features		
		oFet.Appearance = localAsset1
	Next

 

And those works just nice. But the ones for bend or contour just don't work.

We have various colur schemes and users can with iLogic rule easily paint parts from top assy.

Why this method - best results in speed and contrast when using machining/cuts.

 

For now, everything is nicely painted, expect bends on sheet metal parts, and I have no clue of why this is not working (but can be painted manually the same way as face or extrude or hole, ...).

 

Any help on this would be really appreciated!

 

 

 

 

 

 

0 Likes
Message 4 of 4

gregor.strehar
Explorer
Explorer

Looks like this does the trick, I was focused too much onto Bend itself.

oContourFlangeFeature.BendFeature.Appearance = localAsset1

Thnx!

 

0 Likes