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: 

New Part Units

2 REPLIES 2
Reply
Message 1 of 3
ped.watt
253 Views, 2 Replies

New Part Units

First day programing VB.net API for inventor, So Yes this a Noob Question

I using code similar to add a new part to an instance of Inventor, and it works OK. The problem is it is using the Metric Template instead of Imperial Template. I have check and confirmed my application preferences and they reflect "inches". Inve is the Variable name for my Inventor.Application. Thank You in advance


    Set Part = Inve.Documents.Add(kPartDocumentObject)

Tags (1)
2 REPLIES 2
Message 2 of 3
ped.watt
in reply to: ped.watt

I have found a Solution by changing the code to:

Part = Inve.Documents.Add(kPartDocumentObject, "C:\Users\Public\Documents\Autodesk\Inventor 2013\Templates\Standard.ipt")

But is there  cleaner way of doing it?

Message 3 of 3
adam.nagy
in reply to: ped.watt

Hi,

 

You can use the Application.FileManager.GetTemplateFile to get the default template. 

Like in this blog post:

http://modthemachine.typepad.com/my_weblog/2013/01/c-help-examples-for-sheet-metal.html

 

Cheers,



Adam Nagy
Autodesk Platform Services

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

Post to forums  

Autodesk Design & Make Report