Sampe Line Group - set Sample Line Style

Hi All,

I’m searching for a solution to set the sampleline style.

image

Part of the Python code:

                    for i in range(len(addsources)):
                        tmpaddsource = addsources[i].lower()
                        if tmpaddsource in tmpsource:
                            if slgsource.SourceType == addsourcetypes[i]:
                                slgsource.IsSampled = True
                                print(slgsource.SourceType)
                                if slgsource.SourceType == 0:
                                    slgsource.StyleName = "Additional Surface 4"
                                if slgsource.SourceType == 2:
                                    slgsource.StyleName = "HW"

The line “slgsource.StyleName = …” doesn’t work.

Thanks in advance.

hi
Is the problem solved?

My fault, The line “slgsource.StyleName = …” doesn’t work. The member “StyleName” doesn’t exits but the “StyleID” exits.

Found thread : Get list of styles - #4 by Anton_Huizinga but the python code doesn’t work in CPython.

I this case in can’t use the Camber node “Section.Styles”, this is a dropdown list. Why not?

I want to create a Style mapping Excel Sheet:


Hope this makes sense.

Sorry @JPS, I’m not fully understanding. Could you elaborate?