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!
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?
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!
Xiaodong Liang, i can't find this Wish number in the Ideastation, can you provide a link.
Rob.