Import a sheet metal style in iLogic

Import a sheet metal style in iLogic

Anonymous
Not applicable
1,719 Views
6 Replies
Message 1 of 7

Import a sheet metal style in iLogic

Anonymous
Not applicable

Hi,

 

I was wondering if you anyone could help me with importing a sheet metal style (STYLENAME.styxml) into a sheet metal part. 

 

I would like to automatically import the style using an iLogic script.

 

Thanks!

0 Likes
1,720 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

Any idea would be appreciated!

 

So far I have gone to this solution:

1- Copy an existing sheet metal style

2- Modify the parameters to my own style

(Using the code provided in the help- Attched here)

 

The problem is the materials. I have a custom aluminum in my original style that I can't create/import. Is tehre a way to import or mody an existing material in iLogic code?

 

0 Likes
Message 3 of 7

Anonymous
Not applicable

I have got ths for material creation: 

 

Sub Main
CreateMaterial 
End Sub 
Public Sub CreateMaterial()
    ' Set a reference to the part document.
    ' This assumes a part document is active.
    Dim oPartDoc As PartDocument
    Set oPartDoc = ThisApplication.ActiveDocument

    ' Create a new material.
    Dim oNewMaterial As Material
    Set oNewMaterial = oPartDoc.Materials.Add("My Material", 11.37)
    
    ' Define the other properties of the material
    oNewMaterial.LinearExpansion = 5.73
    oNewMaterial.PoissonsRatio = 0.38
    ' Arbitrarily assigns the first render style in the render styles collection.
    oNewMaterial.RenderStyle = oPartDoc.RenderStyles.Item(1)
    oNewMaterial.SpecificHeat = 124.3
    oNewMaterial.ThermalConductivity = 310.2
    oNewMaterial.UltimateTensileStrength = 210.45
    oNewMaterial.YieldStrength = 185.5
    oNewMaterial.YoungsModulus = 76.37
End Sub

 But importing the styxml file would have been much easier!

 

Any ideas? Please!

0 Likes
Message 4 of 7

xiaodong_liang
Autodesk Support
Autodesk Support
Hi rc3ng,

The loading/importing styxml is still a wish which has not been implemented. Sorry if this is bad news for you. The wish number is: 667891.
Message 5 of 7

Anonymous
Not applicable
Thanks for your tip! Now I can stop wondering around to find a command that does not exist yet 🙂
0 Likes
Message 6 of 7

mrattray
Advisor
Advisor
Is this true of all .styxml's, or only sheet metal styles? I'm trying to import a custom unfold style via iLogic.
Mike (not Matt) Rattray

0 Likes
Message 7 of 7

VdVeek
Advocate
Advocate

Xiaodong Liang, i can't find this Wish number in the Ideastation, can you provide a link.

Rob. 

Autodesk Inventor 2015 Certified Professional & Autodesk Inventor 2012 Certified Professional.
0 Likes