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: 

LinearExpansion material property bug

1 REPLY 1
Reply
Message 1 of 2
ACester
280 Views, 1 Reply

LinearExpansion material property bug

Hi guys,

              I use a macro to add a new material in a .ipt, but the value of LinearExpansion property is ever set to 500. If I remove the line in the macro, the value of LinearExpansion property is 0,1.

I use Inventor 2013 SP2 update 2.

The code is this (taken from API help):

 

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("18NiCrMo5", 7.86)
    
    ' Define the other properties of the material
    oNewMaterial.LinearExpansion = 12
    oNewMaterial.PoissonsRatio = 0.3
    ' Arbitrarily assigns the first render style in the render styles collection.
    ' oNewMaterial.RenderStyle = oPartDoc.RenderStyles.Item(1)
    oNewMaterial.SpecificHeat = 0.49
    oNewMaterial.ThermalConductivity = 47
    oNewMaterial.UltimateTensileStrength = 800
    oNewMaterial.YieldStrength = 600
    oNewMaterial.YoungsModulus = 206
End Sub

 

Is It a bug?
Thanks in advance. Have a nice day.

                                Angelo.

1 REPLY 1
Message 2 of 2
xiaodong_liang
in reply to: ACester

Hi,

i have not 2013 at this moment. I tested with 2014. After the line oNewMaterial.LinearExpansion, I checked the property in watch window. It looks it is correct.
Without this line, the default value for the new material is 10 -6.
could you clarify your question with some snapshots?

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

Post to forums  

Autodesk Design & Make Report