Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2012 Autodesk Do More With Less ETO API’s Ishwar Nagwani Technical Consultant.

Similar presentations


Presentation on theme: "© 2012 Autodesk Do More With Less ETO API’s Ishwar Nagwani Technical Consultant."— Presentation transcript:

1 © 2012 Autodesk Do More With Less ETO API’s Ishwar Nagwani Technical Consultant

2 © 2012 Autodesk Class Summary  In this class you explore how to:  Quickly write mockup UI for ETO AddIns  How to use client graphics and do the interaction  Use Intent events  Add Dimensions smartly  Call Methods from an External DLL  Test application on ETO server using batch process  Tips & Tricks

3 © 2012 Autodesk Learning Objectives At the end of this class, you will be able to:  Create ETO AddIns with UI  Use Client Graphics in your designs  Use C# and Intent Events effectively  Add Dimensions Smartly  Call Methods from External DLLs  Test your DLLs with ETO server using Batch process

4 © 2012 Autodesk Create ETO AddIns with UI Intent includes a.NET API. You can call it from a custom user interface that you write using.Net languages like VB.NET and C#. The custom user interface can be in-process with the Intent host, or out-of-process using.NET remoting.

5 © 2012 Autodesk Client Graphics and Interaction Client graphics objects were introduced in ETO 5.1, Inventor 2012. The interaction with client graphics objects has to handled on Inventor side using Selection and Mouse events

6 © 2012 Autodesk Using Intent Events Intent Events and their handlers are used to perform actions automatically when there are changes to the model. These actions are controlled by rules, and therefore have easy access to all rules in the model at that time. Intent Events are a host-independent feature, i.e., it works the same way in Inventor and AutoCAD. For each event, you can define "handler" rules, which tell Intent to perform additional actions at the specified times. The "handler" rules are ordinary Intent methods, which must return a list of "action lists". The "handler" rules can examine the model at the time of the event, can invoke other rules to build part or all of the action lists, and in general can do anything at all. If the handler returns an empty list { }, then nothing happens.

7 © 2012 Autodesk Add Dimensions Smartly Plan ViewElevation View

8 © 2012 Autodesk Calling Methods from an External DLL Intent rules can call public instance or static methods defined in class project. The dll.Net version is important for binary compatibility, i.e. It should be 3.5 for ETO 2012 and 4.0 for ETO 2013. Intent always looks for dll in “\Design Files” folder of active project, currently the location is not configurable. Do not get Inventor Application object in DLL as the Application object returned from standalone ETO and Server are different, pass the %inventorapplication object as argument to the calling method.

9 © 2012 Autodesk Calling Methods from an External DLL Contd… public Boolean ExportDXF( Inventor.Application invApp, Inventor.DrawingView view, Inventor.PartDocument partDoc, string dxfFileName) public Boolean ExportDXF( Inventor.InventorServerClass invApp, Inventor.DrawingView view, Inventor.PartDocument partDoc, string dxfFileName) Example: Method defined in a DLL for standalone & server

10 © 2012 Autodesk Test DLL with ETO server using Batch process Modify LICPATH.LIC file to fetch server license: for e.g. here JEFFERSON is name of server to fetch license from. It could be your computer name for local server. SERVER JEFFERSON 000000000000 USE_SERVER

11 © 2012 Autodesk Test DLL with ETO server using Batch process Contd.. Create the XML file as shown below

12 © 2012 Autodesk Test DLL with ETO server using Batch process Contd.. The XML created is executed from command Line using inventoretoserver –b option

13 © 2012 Autodesk Test DLL with ETO server using Batch process Contd.. The output XML file after batch process with additional information

14 © 2012 Autodesk Thank You!

15 © 2012 Autodesk Autodesk, AutoCAD* [*if/when mentioned in the pertinent material, followed by an alphabetical list of all other trademarks mentioned in the material] are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. Autodesk reserves the right to alter product and services offerings, and specifications and pricing at any time without notice, and is not responsible for typographical or graphical errors that may appear in this document. © 2012 Autodesk, Inc. All rights reserved.


Download ppt "© 2012 Autodesk Do More With Less ETO API’s Ishwar Nagwani Technical Consultant."

Similar presentations


Ads by Google