Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Import a sheet metal style in iLogic

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
1351 Views, 6 Replies

Import a sheet metal style in iLogic

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!

6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

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?

 

Message 3 of 7
Anonymous
in reply to: Anonymous

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!

Tags (1)
Message 4 of 7
xiaodong_liang
in reply to: Anonymous

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
in reply to: xiaodong_liang

Thanks for your tip! Now I can stop wondering around to find a command that does not exist yet 🙂
Message 6 of 7
mrattray
in reply to: xiaodong_liang

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

Message 7 of 7
VdVeek
in reply to: xiaodong_liang

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report