iLogic Create Material

iLogic Create Material

dusan.naus.trz
Advisor Advisor
1,449 Views
3 Replies
Message 1 of 4

iLogic Create Material

dusan.naus.trz
Advisor
Advisor

I can't finish it. I have a lot of material and I wanted to simplify my work.

-I got an error and I can't fix it.

-I wanted to assign Appearance Semi-Polished for MyMaterial I don't know how.

-I don't know if there is an api for creating a TEST LIBRARY library and copying it to the TEST folder. If not creation, then at least copy to the TEST folder.

When I create the codes, I feel like a blind man trying to paint a picture.

2021-02-18_22h56_38.png2021-02-18_23h00_59.png

Sub Main()
    
Dim oPartDoc As PartDocument
'Dim oPartDoc As Inventor.Document

oPartDoc = ThisApplication.ActiveDocument
    
'Create a New material.
    Dim oNewMaterial As MaterialAsset 'Inventor.MaterialAsset 'Material
'Dim oNewMaterial As Asset = oPartDoc.MaterialAssets

oNewMaterial = oPartDoc.Materials.Add("MyMaterial", 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 StylesCollection.
	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

We all have a lot of materials. Too bad it's not a feature of the program. I have no idea how to get it with Excel to the Inventor library. hand it will be a great torment. I have not finished the table of materials, I will have to look for the correct values. I attach the spreadsheet file as an example. 

2021-02-18_23h32_09.png 

0 Likes
1,450 Views
3 Replies
Replies (3)
Message 2 of 4

harri_parker
Contributor
Contributor

Hi, did you find a solution.

I have a same situation to import approximately 2000 materials. Therefore I would like a quicker fix than manually start duplicating them and changing names, as that is the important part. To have correct name on drawing. Of course the mechanical properties too for FEM calculations.

0 Likes
Message 3 of 4

dusan.naus.trz
Advisor
Advisor

Hi,
Unfortunately, no. I haven't made any progress in this direction.

0 Likes
Message 4 of 4

d_eckel
Contributor
Contributor

First Step: for setting material in categories:

https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/set-materialcategory-of-material-in-...

 

I have the same issue importing an Excel Sheet into an Inventor Material Library and i'm trying to find a solution...

0 Likes