Advance Steel Forum
Welcome to Autodesk’s Advance Steel Forums. Share your knowledge, ask questions, and explore popular Advance Steel topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

List of materails through API

1 REPLY 1
Reply
Message 1 of 2
Shtalberg
347 Views, 1 Reply

List of materails through API

Shtalberg
Contributor
Contributor

Hello,

 

I cannot populate enum of AddSelectorCustom by materials. Does anybody knows how to get list of materails by API?

 

0 Likes

List of materails through API

Hello,

 

I cannot populate enum of AddSelectorCustom by materials. Does anybody knows how to get list of materails by API?

 

Tags (2)
Labels (1)
  • API
1 REPLY 1
Message 2 of 2
Buxtehude1963
in reply to: Shtalberg

Buxtehude1963
Advocate
Advocate

Perhaps this can help you...

 

Private Function GetMaterial()

Dim _DBCurrentAddIn As AstorCurrentAddIn = AstorCurrentAddIn.Instance
Dim _TableMaterialCurrentAddIn As System.Data.DataTable = _DBCurrentAddIn.ReadTable("Material")
Dim _CollectionMaterialCurrentAddIn As IEnumerable(Of String) = _TableMaterialCurrentAddIn.AsEnumerable().Select(Of String)(Function(_Row As DataRow) _Row.Field(Of String)("RunName"))

Dim _DBBase As AstorBase = AstorBase.Instance
Dim _TableMaterialBase As System.Data.DataTable = _DBBase.ReadTable("Material")
Dim _CollectionMaterialBase As IEnumerable(Of String) = _TableMaterialBase.AsEnumerable().Select(Of String)(Function(_Row As DataRow) _Row.Field(Of String)("RunName"))

Dim _CollectionMaterial As IEnumerable(Of String) = _CollectionMaterialBase.Concat(_CollectionMaterialCurrentAddIn)

Return _CollectionMaterial

End Function

Perhaps this can help you...

 

Private Function GetMaterial()

Dim _DBCurrentAddIn As AstorCurrentAddIn = AstorCurrentAddIn.Instance
Dim _TableMaterialCurrentAddIn As System.Data.DataTable = _DBCurrentAddIn.ReadTable("Material")
Dim _CollectionMaterialCurrentAddIn As IEnumerable(Of String) = _TableMaterialCurrentAddIn.AsEnumerable().Select(Of String)(Function(_Row As DataRow) _Row.Field(Of String)("RunName"))

Dim _DBBase As AstorBase = AstorBase.Instance
Dim _TableMaterialBase As System.Data.DataTable = _DBBase.ReadTable("Material")
Dim _CollectionMaterialBase As IEnumerable(Of String) = _TableMaterialBase.AsEnumerable().Select(Of String)(Function(_Row As DataRow) _Row.Field(Of String)("RunName"))

Dim _CollectionMaterial As IEnumerable(Of String) = _CollectionMaterialBase.Concat(_CollectionMaterialCurrentAddIn)

Return _CollectionMaterial

End Function

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

Post to forums  

Autodesk Design & Make Report