© 2011 Autodesk Porting ObjectARX ® Applications and User Interfaces to AutoCAD ® for Mac ® Asheem Mamoowala Software Engineer, Autodesk.

Slides:



Advertisements
Similar presentations
Brown University Swim Center
Advertisements

© 2013 Autodesk Preparing Apps for the Store: Guidelines Autodesk Exchange for Autodesk ® Revit ®
© 2011 Autodesk Capitalize on Corridor Improvements in AutoCAD ® Civil 3D ® Don Quinn Civil Engineer / Eagle Point Product Specialist.
© 2012 Autodesk MA5938-V Integrating Autodesk® Inventor® with SAP and Utilizing Model Structure for Production Planning Alexander Crane CIDEON consultant.
© 2011 Autodesk Charging on from Schematics to Panels in AutoCAD ® Electrical (MA4757-L) Todd Schmoock Solutions Engineer - Synergis Technologies, Inc.
Autodesk ® Design Review 2012 What’s New. New Features Summary Autodesk Design Review Paste Image onto a 2D Sheet (New) 2. Create Symbols from.
© 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.
Understanding the Alignments and Profiles API in AutoCAD® Civil 3D®
© 2011 Autodesk Navigating Through the Corridor using AutoCAD® Civil 3D®.NET API Augusto Goncalves Senior Developer Consultant at Autodesk.
PD How to setup a perfect project for AutoCAD P&ID and Plant 3D
© 2012 Autodesk Conceptual and Design Workflows Using Autodesk ® 360 Integrated Applications Anirban Ghosh Principal User Experience Designer – DLS Mobile.
© 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.
© 2012 Autodesk Dario Nicolini Product Manager Autodesk ® Inventor ® iLogic: a great Autodesk tool to improve Inventor features.
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.
© 2012 Autodesk Implementing Cloud-Based Productivity Solutions with the AutoCAD® ObjectARX® API Ravi Krishnaswamy Senior Software Architect.
© 2012 Autodesk Autodesk® Revit® Structure: From Design to Detailing and Fabrication to Construction Allen Levy Applications Specialist.
© 2012 Autodesk Have It Your Way: Customizing Apps in PLM 360 Trung Nguyen & Joseph Piggee Product Manager Product Specialist.
© 2012 Autodesk CI4820-V Feeling the Lay of the Land: Civil 3D and 3ds MAX Design for Landscape Architecture Robert Ward Landscape Architect LEED AP.
© 2012 Autodesk AC It's a Plug-in. It's an App. It's Autodesk® Exchange Apps! Karen Mason Principal User Experience Designer, Autodesk.
© 2012 Autodesk AutoCAD ® Virtualized and Digitized michael trachtenberg - AE BackOffice Software Director.
© 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.
© 2012 Autodesk AutoCAD on Electrical Steroids Randy Brunette Electrical Subject Matter Expert (Autodesk)
© 2011 Autodesk Moving from Desktop to Cloud Albert Szilvasy Software Architect, AutoCAD Engineering Team.
© 2012 Autodesk MP3765-P - Using BIM to Streamline Your Energy Modeling Workflows Jeff Olden Energy Analyst.
That Dam Corridor: AutoCAD® Civil 3D® Modeling for New and Rehab Dam Projects Yates Austin Schnabel Engineering Dana Probert Autodesk.
© 2012 Autodesk Autodesk Structural Curriculum 2013 Unit 2: User Interface Autodesk® Revit® Structure Software User Interface.
© 2011 Autodesk Converting Existing Piping Specs Ian Matthew Technical Marketing Manager, Autodesk.
© 2011 Autodesk Popular Design Patterns and How to Implement Them in.NET Gopinath Taget Senior Developer Consultant.
© 2011 Autodesk Managing Your Standards and Reusable Content with AutoCAD Tool Palettes – Revealed! Matt Murphy Director of Content Management and Development.
© 2012 Autodesk AutoCAD® API.NET Tips and Tricks James E. Johnson Application Developer for Synergis Software.
© 2012 Autodesk From Nothing to Something using AutoCAD ® Electrical Todd Schmoock Solutions Engineer - Synergis Technologies, Inc.
© 2012 Autodesk Adding Instrumentation and Electrical Capabilities to Autodesk® Plant Design Suite Andy Bonfield.
© 2011 Autodesk Importing the Most Useful Data Into Survey in AutoCAD Civil 3D 2012 Russ Nicloy Civil Applications Engineer.
© 2011 Autodesk Rain in the Plain: An Introduction to Autodesk® Storm and Sanitary Analysis Matthew Anderson, PE CFM QA Consultant – Autodesk. Inc. Lab.
© 2012 Autodesk AC4483-R - Extending the Power of AutoCAD® with Autodesk® Exchange Apps Karen Mason Principal User Experience Designer, Autodesk.
© 2012 Autodesk Going for the Gold with Data Management AB6022-V Adam Peter Customer Success Engineer.
Join us on Twitter: #AU2014. Class summary text goes here Class summary.
© 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.
© 2011 Autodesk AC2182 P - Autodesk 3ds Max for Starters Create Stunning Renderings For All Situations Christopher Fernandez Senior Applications Specialist,
© 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 Painless Productivity Programming with the AutoCAD Action Recorder – Revealed! Matt Murphy Director of Content Management and Development.
© 2012 Autodesk Pressure Pipe Networks in AutoCAD ® Civil 3D ® 2013 Matthew Anderson Technical Consultant, Autodesk Jim Paquette Software Development Manager.
© 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
An In-Depth Look at the Autodesk® AutoCAD® App Autoloader Module
Water! Water! Quenching Your Thirst for Water in AutoCAD® Civil 3D®
Step it up a Rung from AutoCAD® Designs to AutoCAD® Electrical (MA4762-L) Todd Schmoock Solutions Engineer - Synergis Technologies, Inc.
Autodesk® Revit® Rendering Tips You Can Use
Creating Intelligent Details in Autodesk® Revit®
Check Out These ‘Suite’ Workflows
Using Scripts, AutoLISP® and
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
Autodesk Navisworks: Practical Tips and Tricks from Seven Years in the Construction Industry Josh Lowe Project Lead, TURIS Systems.
AB6105-V: Autodesk® Revit® Reality Check for Residential Construction
BIM for Interiors: Making Autodesk® Revit® Work for You
MP1483 Massing and using Architecture Models for Revit MEP 2013 Analysis Simon Whitbread Application Specialist.
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.
Beyond Massing: Conceptual Design in Autodesk® Revit® Architecture 2012 David Fano Partner | CASE Design, Inc |
Presentation transcript:

© 2011 Autodesk Porting ObjectARX ® Applications and User Interfaces to AutoCAD ® for Mac ® Asheem Mamoowala Software Engineer, Autodesk

© 2011 Autodesk Agenda  Introduction  Brief History of AutoCAD for Mac  Compare Windows and Mac APIs  Cross Platform Development Basics  Mac User Interface Overview  CUI  Auto Loader

© 2011 Autodesk Introduction

© 2011 Autodesk Class Summary This class shows how to completely port your existing Windows®-based ObjectARX applications to AutoCAD for Mac. Watch live coding demonstrations that will show you how to quickly compile your existing ObjectARX code for commands and custom entities on the Apple® Mac with XCode® developer software. Learn to re- create your dialogs and palettes using the Cocoa® framework and how to autoload your applications and CUI files into AutoCAD for Mac.

© 2011 Autodesk Learning Objectives At the end of this class, you will be able to:  Describe cross-platform coding techniques  Port your code to Apple Mac  Integrate your commands with AutoCAD for Mac menus and toolbars  Develop native Apple user interfaces for AutoCAD for Mac

© 2011 Autodesk AutoCAD for Mac

© 2011 Autodesk AutoCAD for Mac History  AutoCAD supported 10+ platforms up to the early 90s  This supported was dropped due to limited users  AutoCAD for Mac dropped after 2 releases (R12 and R13)  Used cross-platform UI components including DCL  Mac support brought back with AutoCAD for Mac released in October 2010, and September 2011  Mac product line includes AutoCAD, AutoCAD LT, and AutoCAD WS

© 2011 Autodesk AutoCAD for Mac  AutoCAD for Mac is 64-bit only  Supports OSX and Intel-based Macs  Uses Cocoa framework for UI  Not cross-platform

© 2011 Autodesk API Comparison APIWindowsMac C++ (ObjectARX) YES Win32 YESPARTIAL MFC/ActiveX/COM YESNO.NET (C#/XAML/WinForms/WPF) YESNO LISP YES DCL YESNO Qt YES Objective-C/Cocoa NOYES

© 2011 Autodesk API Comparison  On Windows, AutoCAD uses Fibers as an alternative to Threading.  Fibers are not available on the Mac  CP322-1 Migrating AutoCAD Apps to the Fiberless Environment (AU 2010)

© 2011 Autodesk Porting and Development

© 2011 Autodesk Cross Platform Development Basics  64-bit Migration required  ObjectARX provides polymorphic data types  String Handling  OSX uses Unicode UTF16 whereas Windows uses UTF8  Conversion required between wchar_t or CString and NSString  Careful about Unicode format differences  File paths  Forward slash supported on all platforms  Back slash only on Windows

© 2011 Autodesk Porting ObjectARX Code  Separate the commands and core logic from Windows-code  Share static libs or source files between Windows/MFC DLL and Mac Bundle  Use Compiler to address warnings and errors  Conflicting types  Windows dependencies  Compiler differences  Templates  Unavailable APIs  Use polymorphic type  Adesk::Int64 and Adesk::Boolean

© 2011 Autodesk DEMO

© 2011 Autodesk Linking modules for Runtime  OSX has a couple different strategies for dynamically linking modules  Dependent libraries  Loaded together  Runtime-loaded libraries  Dynamically loaded  Requires setting up the Xcode confiugration files correctly  Install Name and path  Run-path  Library search paths correctly  Otool –L  Tool for inspecting file references inside a compiled module

© 2011 Autodesk 16 Linking modules for Runtime

© 2011 Autodesk User Interface

© 2011 Autodesk User Interface Overview  Uses Cocoa framework  Follows Apple OSX User Interface guidelines  Cocoa has equivalent controls for most MFC/Windows controls  Ribbon is replaced by ToolSets  Customizable through CUI  Contextual Ribbon is replaced by Visor

© 2011 Autodesk Objective-C++  Allows mixing C++ and Objective-C in a single source file  Use ObjectARX APIs and C++ in the same module  Some ObjectARX types conflict with Apple’s Carbon/Cocoa APIs  Be careful with.h includes  Objective-C++ only works if the.mm file type is used

© 2011 Autodesk Cocoa  Similar architecture to WPF  Uses the Model-View-Controller pattern  Stricter than MFC  Stray too much and bugs will be harder to fix  UI Controls expose delegates as an alternative to sub classing  Objects are reference counted and need to be managed correctly

© 2011 Autodesk Modal Dialog  Use Interface Builder to  Layout controls  Associate with Action methods in Code  Data binding  Show a dialog using [NSApp runModalForWindow:]  NSWindowController  In.mm files you can mix Objective-C with ObjectARX’s C++ APIs

© 2011 Autodesk DEMO

© 2011 Autodesk Modeless Windows  Use NSPanel subclass of NSWIndow  AutoCAD Palettes do not use the Cocoa HUD- Style  Show a palette using [NSWindowController showWindow:]  Use reactor notifications same as you would in MFC  Must un-bind elements when closing or unloading the window

© 2011 Autodesk CUI and AutoLoader

© 2011 Autodesk CUI  Supports a subset of the CUI extensibility that Windows does  Add Command Macros  Includes Icons and Tooltips  Add entire ToolSets, or panels to existing ToolSets  Add Menus  The format of the.CUIx file is shared  CUI Command and dialog have been ported partially and can be used to create and edit CUI files

© 2011 Autodesk Partial CUI  ObjectARX applications can provide a partial CUI for their own Commands  Must be installed inside your ARX bundle in MyArx.bundle/Contents/Resources  Place reference images in the same folder  No Debug tools available for errors when loading Partial CUIs  Create entries in the AutoCAD for Mac CUI dialog  Extract from the CUI file  /Users/ /Library/Application Support/Autodesk/roaming/AutoCAD 2012/R18.2/enu/Support/

© 2011 Autodesk Partial CUI Sample

© 2011 Autodesk AutoLoader  New system for automatically loading 3 rd party ARX applications into AutoCAD  Requires  Installation of ARX bundles to /Application/Autodesk/ApplicationPlugins/  Inclusion of a PackageContents.xml definition file  AutoCAD will auto-load your components  ARX applications  Partial CUI files  LISP files

© 2011 Autodesk AutoLoader PackageContents

© 2011 Autodesk DEMO

© 2011 Autodesk Summary  Port Windows ARX application by separating core logic from Windows-specific code  Implement Mac UI in Cocoa  Use Partial CUI to integrate your application into AutoCAD for Mac  Leverage the autoloader feature to deploy and load your ARX application

© 2011 Autodesk Links  Fiberless Porting :  Apple Human Interface Guidelines : ual/AppleHIGuidelines/OSXHIGuidelines.pdf ual/AppleHIGuidelines/OSXHIGuidelines.pdf  Autodesk WikiHelp: umentation/Migrating_Windows_Applications umentation/Migrating_Windows_Applications  ObjectARX for Mac Download:

© 2011 Autodesk Thank you!

© 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.