Reaching all material data from Apprentice Server

Reaching all material data from Apprentice Server

tolgay.hickiran
Advisor Advisor
948 Views
9 Replies
Message 1 of 10

Reaching all material data from Apprentice Server

tolgay.hickiran
Advisor
Advisor

Hello guys,

 

We have a small 3rd party that we've written for ourselves and we want to develop the code further. What we want is that get all the material data from the top level assembly without opening it on Inventor.

 

I know this can be done in apprentice but i have yet to find a solution.

 

Here's an example.

 

We have a sheet metal assembly with different types of material and thickness. We want to immediately the unique types on a form so that we can manipulate the data further.

 

Any suggestions?


Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

0 Likes
Accepted solutions (1)
949 Views
9 Replies
Replies (9)
Message 2 of 10

HermJan.Otterman
Advisor
Advisor

Hello JayJay,

 

Look at this:

 

http://modthemachine.typepad.com/my_weblog/2010/03/iproperties-without-inventor-apprentice.html

 

Apprentice has no interface, so no forms....

 

why do you want to do this with apprentice?

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 3 of 10

tolgay.hickiran
Advisor
Advisor
Hello Herm,

This is Tolgay dont mind the ID it was a mistake.

So, the idea here is to get all the material and thickness data in an instant without opening Inventor, and with this data we will know what kind of sheet metal types we are going to use in that particular project in an instant.

I couldn't reach the material data from the inventor BOM, i can reach some data from BOM, such as itemquantity and totalquantity etc, but i wasnt able to get the material data. ( By Inventor i mean the apprentice server )

The main reason is to get the data faster, because it is a bit more slower to get it from direct inventor API.

Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

0 Likes
Message 4 of 10

NachoShaw
Advisor
Advisor

Hi

 

From what I understand, Apprentice cannot access the material or appearance. You will need full inventor for that however, you can get the material as an iProperty using InventorApprentice from the link provided earlier. I know you can because I do the same in my application 🙂

 

Nacho

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
Message 5 of 10

tolgay.hickiran
Advisor
Advisor
Hi Nacho,

As i've mentioned earlier, i failed to find how to reach material data from InventorApprentice.

I managed to reach BOM, iProperties and so on. If you can show me how to get to the material data that would be great.

Otherwise we are going to use the "Custom Property" tab in iProperties to be able to read the necessary data, which makes us use another 3rd party to write the material data on it.

Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

0 Likes
Message 6 of 10

tolgay.hickiran
Advisor
Advisor
Can you give a small code how you reach the material data from apprentice Nacho?

Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

0 Likes
Message 7 of 10

NachoShaw
Advisor
Advisor
Accepted solution

hi

 

sorry its taken a while to reply, ive been mad busy with work. below is a code example

 

Dim apprentice As New ApprenticeServerComponent 
Dim doc As ApprenticeServerDocument  = apprentice.Open("C:\Temp\Part1.ipt")  

Dim oPropSet As PropertySet = doc.PropertySets.Item("Design Tracking Properties")

Dim sMats As String = oPropSet.Item("Material").Value

cheers

 

nacho

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


Message 8 of 10

raith-mb
Advocate
Advocate

You Need to get the FullFileName of all sheetmetal components out of the BOM.

With the FullFileName just open each File in Apprentice and get the Material and the sheetmetal Thickness

 

Roland.

0 Likes
Message 9 of 10

tolgay.hickiran
Advisor
Advisor
Thanks Nacho!

Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

0 Likes
Message 10 of 10

Jef_E
Collaborator
Collaborator

@NachoShaw wrote:

hi

 

sorry its taken a while to reply, ive been mad busy with work. below is a code example

 

Dim apprentice As New ApprenticeServerComponent 
Dim doc As ApprenticeServerDocument  = apprentice.Open("C:\Temp\Part1.ipt")  

Dim oPropSet As PropertySet = doc.PropertySets.Item("Design Tracking Properties")

Dim sMats As String = oPropSet.Item("Material").Value

cheers

 

nacho


Hi @NachoShaw I know this post is over a year old, but is it possible to change the material using apprentice?



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2