© 2011 Autodesk Autodesk Inventor®: Client Graphics API exposed Philippe Leefsma Developer Consultant - Autodesk Developer Network.

Slides:



Advertisements
Similar presentations
© 2011 Autodesk Capitalize on Corridor Improvements in AutoCAD ® Civil 3D ® Don Quinn Civil Engineer / Eagle Point Product Specialist.
Advertisements

© 2012 Autodesk MA5938-V Integrating Autodesk® Inventor® with SAP and Utilizing Model Structure for Production Planning Alexander Crane CIDEON consultant.
© 2011 Autodesk Precast Concrete Industry Extensions for Autodesk® Revit® Structure 2012 Reinhard Lackner General Manager, IDAT.
© 2012 Autodesk Get Your Head into the Cloud: How to Make Digital Asset Management Work for You Oscar R. Cantu’ Topcon University.
© 2011 Autodesk Organize and Manage Your Intellectual Property with Autodesk® Vault Workgroup Projects Pascal Le Guellec Market Development Consultant,
© 2011 Autodesk Case Studies: Simulation Problem Solving for Industrial Machinery and Consumer Product Design Shakeel Mirza Technical Consultant, Simulation.
© 2012 Autodesk M5935-V Integrating SAP® with AutoCAD® Bill Svokos CIDEON consultant SAP PLM.
© 2011 Autodesk MA4712-P Simulation PowerTrack Working with Any CAD Format and Autodesk Simulation Luke Mihelcic Product Marketing Manager | Digital Simulation.
© 2011 Autodesk AC5089: Mesh Modeling in AutoCAD® Dave Young Application Engineer – Repro Products.
© 2012 Autodesk CP Autodesk® 3ds Max®.NET API Introduction and Techniques Kevin Vandecar Principal Developer Consulting Engineer – M&E Autodesk Developer.
© 2011 Autodesk Navigating Through the Corridor using AutoCAD® Civil 3D®.NET API Augusto Goncalves Senior Developer Consultant at Autodesk.
© 2011 Autodesk Suites and CAD Managers Jerry Milana Autodesk Consulting.
© 2012 Autodesk Using Autodesk ® Inventor ® for Sales Mark Keenan Business Development, Technicon Systems, Inc.
© 2012 Autodesk Conceptual and Design Workflows Using Autodesk ® 360 Integrated Applications Anirban Ghosh Principal User Experience Designer – DLS Mobile.
© 2011 Autodesk Publishing Infrastructure Data to Map Books GS3341 Andy Morsell, P.E. Consultant Autodesk Global Services Utilities & Telecom Consulting.
© 2011 Autodesk Single Job 1 Processor 1 Single Job 2 Single Job 3 Processor 2 Processor 3 Big Job 1 Big Job 2 Single Job 4 Processor 1 Single Job 5 Single.
© 2011 Autodesk Mechatronics-Taming the Beast Randy Brunette Consultant, Trainer, All Around Good Guy Brunette Technologies, LLC.
© 2011 Autodesk Autodesk ® Revit ® MEP Content Creation Lab MP5076-L Ryan Tivis CAD/Model Manager – Ring & DuChateau Dennis Hopper CAD/BIM Manager – GE.
© 2012 Autodesk Dario Nicolini Product Manager Autodesk ® Inventor ® iLogic: a great Autodesk tool to improve Inventor features.
© 2011 Autodesk Unleash the Power of Autodesk® SketchBook® Designer Michal Jelinek Technical account manager Creative and advanced design EMEA MFG Automotive.
© 2011 Autodesk Autodesk® Revit® MEP: Fast Families for Engineers David Butts BIM Specialist – Gannett Fleming.
© 2011 Autodesk Shop Drawings in Autodesk® Revit®. What? It can Do That? Ron Palma Application Specialist.
Scripting Components for AutoCAD Plant 3D
© 2012 Autodesk Do More With Less ETO API’s Ishwar Nagwani Technical Consultant.
© 2011 Autodesk CP5239 Demand-Loading AutoCAD®.NET Plug-ins James E. Johnson Synergis Software Sr. CAD Developer.
© 2011 Autodesk SE4186: Getting Productive with Autodesk Revit ® Structure David Bleiman CEO, Rutherford & Chekene.
© 2012 Autodesk Fabricating Sheet Metal William Graham Inventor Designer.
© 2011 Autodesk MA4299: A Sneak Peek into the Manufacturing Simulation Future Peter Maxfield Principal User Experience Designer.
© 2012 Autodesk Autodesk 360 Jerry Campbell VDC Consultant.
© 2011 Autodesk Making Dirt Look Good: Autodesk ® Civil View Kristina Bollin Technical Specialist, U.S. CAD.
© 2012 Autodesk BIM on an Etch a Sketch Jose Guia Janitor extraordinaire
© 2012 Autodesk The Devil Is In The Workflow Module 1: Successfully Plan and Implement BIM Luis Rojas Building Design Product Line Manager, Eagle Point.
© 2011 Autodesk CM D Standards : New Thinking Allan Chalmers – Kempe Engineering Kevin J. Smedley – Engineering Design Systems, Inc.
© 2011 Autodesk Mechanical Simulation in AutoCAD ® 2012 Craig A. Miller – Pennsylvania College of Technology CAD Technology Specialist.
© 2012 Autodesk Project Architect-Times-a-Changing: How to transition from yesterday to today Christopher Ozog Project Architect.
© 2012 Autodesk AutoCAD on Electrical Steroids Randy Brunette Electrical Subject Matter Expert (Autodesk)
© 2012 Autodesk Matthew Stuver, LEED AP BD+C BIM Manager Dynamix Engineering Ltd. MP1425-R: AU2012 AutoCAD® Revit® MEP Family Reunion.
© 2011 Autodesk Storm and Sewer Planning with AutoCAD ® Map 3D and Autodesk ® Storm and Sanitary Analysis Tanya West, PE, LEED AP Autodesk Technical Specialist.
© 2011 Autodesk Popular Design Patterns and How to Implement Them in.NET Gopinath Taget Senior Developer Consultant.
© 2012 Autodesk AutoCAD® API.NET Tips and Tricks James E. Johnson Application Developer for Synergis Software.
© 2012 Autodesk Rolling Your Own: Building Apps in Autodesk® PLM 360 Joseph Piggee Trung Nguyen.
© 2012 Autodesk Adding Instrumentation and Electrical Capabilities to Autodesk® Plant Design Suite Andy Bonfield.
© 2012 Autodesk Autodesk® Revit® MEP: Get Current with Electrical Engineering Module 1 – Dual Circuiting Seth Mathis Schmidt Associates BIM Designer.
© 2012 Autodesk Parametrics Master Class Martin Duke Business Systems Manager.
© 2012 Autodesk Nonfiction: A CAD Manager in a Box PL2027-R Tim BourdoisBrian Schanen Aluminum Curtainwall Systems / NetwiseAutodesk.
Join us on Twitter: #AU2014. Class summary text goes here Class summary.
© 2011 Autodesk Showcase your Inventor Models David Edward Gaskill CAD Designer or
© 2012 Autodesk Have a tablet? The handout is available for iBooks, Kindle, and Adliko.
© 2012 Autodesk Sweet Suite Collaboration Module 1: Suite Interoperability Veronica Lamb Technical Specialist, US CAD of Hawaii.
© 2012 Autodesk Customizing AutoCAD P&ID David Wolfe Process and Power Specialist.
© 2012 Autodesk AB1851 Optimizing the Design Development Stage using Revit Architecture Douglas Bowers, AIA, LEED AP BD+C Doug Bowers Consulting, LLC.
© 2011 Autodesk FDO 2.0: The Magic Grows Gary Rosen Regional Sales Director – Carlson Software.
© 2012 Autodesk The Picture Says It All: Commercial Site Plan 3D Visualizations Using Autodesk® IDS John Sayre Civil Application Engineer.
© 2011 Autodesk The Suite Life of AutoCAD® Guillermo Melantoni Sr Product Manager: Workflows and Interoperability at Autodesk.
© 2012 Autodesk SM3595-R | Thinking of Design, Engineering, and Simulation Differently! Luke Mihelcic Product Marketing Manager | ISM – Simulation Industry.
© 2012 Autodesk Collaboration Systems – It’s good to share Martin Duke Business Systems Manager.
© 2011 Autodesk Customizing AutoCAD ® Plant 3D Isometrics Joel HarrisIan Matthew Piping Technology Specialist, Anvil Corp.Technical Marketing Manager,
© 2011 Autodesk Consumer Product Design and Simulation James Herzing Technical Consultant– Autodesk, Inc. Mike Smell Technical Consultant – Autodesk, Inc.
© 2011 Autodesk The Autodesk® Revit® Theory of Relativity: Understanding Shared Coordinates Paul F. Aubin Author/Consultant.
© 2011 Autodesk Publish Autodesk® Inventor® Building Components for Consumption in AutoCAD® MEP and Revit® MEP Jay Ayala Solutions Engineer.
© 2012 Autodesk From CAD to Awesome: AutoCAD® and Autodesk® SketchBook® Designer Guillermo Melantoni Product Line Manager: Personal Design & Fabrication.
Applying the Top 10 New Features and Functions in AutoCAD® 2012
Civil 3D®: An All Around Geospatial Software Package
Are You STILL Not Using AutoCAD® Civil 3D ®?
Water! Water! Quenching Your Thirst for Water in AutoCAD® Civil 3D®
Check Out These ‘Suite’ Workflows
Using Quantity Takeoff and Linked Models in Revit to Estimate a Project as the Design Changes Kevin R. Miller, Brigham Young University Scott Davis & TJ.
CM1847 Migrating AutoCAD Standards to Revit
DG7160 Autodesk 3DS Max Certification Prep Part 1
Using Quantity Takeoff and Linked Models in Revit to Estimate a Project as the Design Changes Kevin R. Miller, Brigham Young University Scott Davis & TJ.
Presentation transcript:

© 2011 Autodesk Autodesk Inventor®: Client Graphics API exposed Philippe Leefsma Developer Consultant - Autodesk Developer Network

© 2011 Autodesk Class Summary In this class we will explore the Inventor® Client Graphics API, a functionality that provides the ability to dynamically display custom graphics in the Inventor® modeling window. It will benefit developers who want to enhance their plug-in commands by integrating visual feedback, as well as those migrating their existing solutions from systems that rely on OpenGL-based graphics.

© 2011 Autodesk Learning Objectives At the end of this class, you will be able to:  Describe the ClientGraphics Object model, how the API is structured and how to use it  Leverage your commands by creating professional level visual feedback  Master advanced features of ClientGraphics API We assume you are already skilled in:  C# or VB.NET programming  The basics of Inventor API  Inventor product usage

© 2011 Autodesk Philippe Leefsma Developer Technical Services EMEA Philippe has a master's degree in Computer Sciences. He studied in Paris at I.S.E.P and at Colorado School of Mines in the USA. He joined Autodesk 5 years ago where he works as developer consultant for the Autodesk Developer Network. He supports various product APIs including AutoCAD®, AutoCAD Mechanical®, and Autodesk® Inventor®. He enjoys traveling and meeting developers from around the world to work with them on CAD and manufacturing related application development. About the Presenter

© 2011 Autodesk Agenda I - The ClientGraphics API  ClientGraphics Object Model  GraphicsData Object Model  Methodology II - Graphic Primitives Exposed  Common properties  Primitive types  Using Primitives and Graphics Data III - Advanced use of Client Graphics  Use of GraphicsManager  Interaction Graphics  Storing Graphics  Other functionalities

© 2011 Autodesk I - ClientGraphics API

© 2011 Autodesk What are ClientGraphics and Why do you need them?  Ability to draw custom graphics alongside Inventor native graphics  Insulate from the underlying graphics platform  Enhance your plug-in commands by integrating visual feedback  Migrate solutions based on OpenGL graphics

© 2011 Autodesk The applications of ClientGraphics Client Graphics are widely used in native Inventor commands and add-ins:  Represent custom and transient objects  Create interactive previews during commands  Display the results of various analyses  Creating custom manipulators within a command  Enhance user experience

© 2011 Autodesk The applications of ClientGraphics

© 2011 Autodesk ClientGraphics Object Model

© 2011 Autodesk ClientGraphics Types  Regular ClientGraphics:  Associated with a document  Transient unless owned by a ClientFeature  Can be obtained from different sources :  PartComponentDefinition  AssemblyComponentDefinition  FlatPattern  DrawingView, Sheet  ClientFeatureDefinition  Interaction ClientGraphics:  Only available when InteractionEvents is running  Display preview graphics or manipulators while running a command  Automatically deleted when InteractionEvents terminates

© 2011 Autodesk GraphicsNode basic properties GraphicsNode object has some properties to control default behavior of all primitives it contains. Here are the most important:  Render Style  Visibility Visible | VisibleInViews | VisibleInActiveEditObject  Selectable  Transformation

© 2011 Autodesk GraphicsData Object Model

© 2011 Autodesk General Procedure to draw ClientGraphics Creation of ClientGraphics follows the general procedure below: Graphic Source Document (ipt, iam) DrawingView / Sheet Flat Pattern ClientFeature Interaction Event ClientGraphics Collection ClientGraphics GraphicsNode Surface Graphics Coords Set Color Set Graphic Source GraphicsDataSets Collection GraphicsDataSets Line Graphics Triangle Graphics

© 2011 Autodesk Our first Client Graphics program

© 2011 Autodesk II - Graphic Primitives Exposed

© 2011 Autodesk GraphicsPrimitives - Common Properties GraphicsPrimitive objects represent the graphics you can see in Inventor graphic window. Here are some properties and methods common to all of them:  BurnThrough  DepthPriority  SetViewSpaceAnchor  SetTransformBehavior

© 2011 Autodesk GraphicsPrimitive Types

© 2011 Autodesk Primitives and GraphicsData  GraphicsDataSets allow to create data input for primitives that need it  They are also used to customize primitives with colors, textures or images  Specific GraphicDataSet objects are created from the GraphicsDataSets collection

© 2011 Autodesk Reusing native model data  CurveGraphics  Can use geometry of edges from model: Edge.Geometry or curves generated by TransientGeometry  SurfaceGraphics  Can use SurfaceBody from model or solids generated by TransientBRep  ComponentGraphics  Can use any loaded ComponentDefinition from Part or Assembly

© 2011 Autodesk III - Advanced use of Client Graphics

© 2011 Autodesk ClientGraphics Manager - Sample void BasicDemoWithGraphicMng() { Inventor.Application InvApp = AdnInventorUtilities.InvApplication; double[] startPoint = new double[] {0.0, 0.0, 0.0}; double[] endPoint = new double[] {1.0, 1.0, 1.0}; // Create instance of AdnClientGraphicsManager AdnClientGraphicsManager clientGraphicsMng = new AdnClientGraphicsManager(InvApp, AdnInventorUtilities.AddInGuid); // Set active document as current graphics source clientGraphicsMng.SetGraphicsSource(InvApp.ActiveDocument); // Create LineGraphics primitive LineGraphics lineGraph = clientGraphicsMng.DrawLine(startPoint, endPoint); lineGraph.LineWeight = 5.0; // Update view to see results clientGraphicsMng.UpdateView(); }

© 2011 Autodesk Interaction Graphics  InteractionGraphics behave in a similar way than regular ClientGraphics  Only relevant in InteractionEvents context > terminates with it  Well suited for dynamic feedback / preview during a command

© 2011 Autodesk Overlay vs Preview Graphics InteractionGraphics can use Preview or Overlay graphics:  Preview graphics = equivalent to regular ClientGraphics (non-transacting)  Overlay graphics = draw independently in a special «overlay» plane Use: Overlay graphics can be much faster when Inventor model view is stationary and only graphics need to be updated. Example: Result preview in sketch environment

© 2011 Autodesk Command Manipulators Various InteractionEvents sub-events can be used to handle manipulators within your command GraphicsPrimitive.SetTransformBehavior Can be used to generate constant size and/or front facing graphics SetTransformBehavior( Point Anchor, DisplayTransformBehaviorEnum BehaviorType, double PixelScale)

© 2011 Autodesk Storing Graphics  ClientGraphics are transient by nature  The only way to persist them across sessions are:  Recreate them with your application logic when document is open  Host the graphics inside a ClientFeature

© 2011 Autodesk Transacting vs Non-Transacting Graphics  New non-transacting graphics functionality added in 2012  Non-transacting graphics are now available outside of InteractionEvents  Graphics that do not require undo/redo can be drawn much faster if not transacting

© 2011 Autodesk Miscellaneous functionalities  Slicing  Texture Mapping

© 2011 Autodesk Wrap up During this class:  We have seen the basic workflow and fundamentals objects to create Graphics  We analyzed the various primitive types and their utility  We exposed advanced functionalities of the ClientGraphics you can use to enhance your commands

© 2011 Autodesk Material  Presentation  AU11_CP3320_Client_Graphics_API_Exposed.pptx  Hands Out  AU11_CP3320_Client_Graphics_API_Exposed.pdf  Code Samples  ClientGraphicsDemoAU Add-in – C#  ClientGraphics Add-in – VB.Net  ClientGraphics.ivb – VBA

© 2011 Autodesk Resources for Inventor developers  Online Help, Developer's Guide and SDK Samples  Inventor Developer Center  Webcasts and Trainings on Inventor Programming and News  Discussion Group > Inventor  API Training Classes  ADN, The Autodesk Developer Network  DevHelp Online for ADN members

© 2011 Autodesk Autodesk Developer Network  Access to almost all Autodesk software and SDK’s  Includes early access to beta software  Members-only website with thousands of technical articles  Unlimited technical support  Product direction through conferences  Marketing benefits  Exposure on autodesk.com  Promotional opportunities  Up to three free API training classes  Based on user level

© 2011 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. © 2011 Autodesk, Inc. All rights reserved.