© 2011 Autodesk CP5239 Demand-Loading AutoCAD®.NET Plug-ins James E. Johnson Synergis Software Sr. CAD Developer.

Slides:



Advertisements
Similar presentations
© 2013 Autodesk Preparing Apps for the Store: Guidelines Autodesk Exchange for Autodesk ® Revit ®
Advertisements

© 2012 Autodesk Presenter’s First and Last Name Presenter’s Title AutoCAD ® Architecture 2013 What’s New Image courtesy of Wilson Architects.
© 2011 Autodesk Capitalize on Corridor Improvements in AutoCAD ® Civil 3D ® Don Quinn Civil Engineer / Eagle Point Product Specialist.
© 2012 Autodesk Using.NET in the Land of NOD James E. Johnson Application Developer for Synergis Software.
© 2012 Autodesk AV4676-V - Integrating Water Elements and Fountains into Architectural Renderings Using Particle Flow Steven Schain Autodesk Certified.
© 2011 Autodesk Charging on from Schematics to Panels in AutoCAD ® Electrical (MA4757-L) Todd Schmoock Solutions Engineer - Synergis Technologies, Inc.
© 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 Conceptual and Design Workflows Using Autodesk ® 360 Integrated Applications Anirban Ghosh Principal User Experience Designer – DLS Mobile.
© 2012 Autodesk Dario Nicolini Product Manager Autodesk ® Inventor ® iLogic: a great Autodesk tool to improve Inventor features.
© 2011 Autodesk Autodesk® Revit® MEP: Fast Families for Engineers David Butts BIM Specialist – Gannett Fleming.
© 2011 Autodesk CP Leveraging ActiveX® Libraries with AutoLISP® Lee Ambrosius – Autodesk, Inc. Sr. Technical Writer – PSEB User Assistance.
Scripting Components for AutoCAD Plant 3D
© 2012 Autodesk Do More With Less ETO API’s Ishwar Nagwani Technical Consultant.
© 2012 Autodesk Implementing Cloud-Based Productivity Solutions with the AutoCAD® ObjectARX® API Ravi Krishnaswamy Senior Software Architect.
© 2011 Autodesk SE4186: Getting Productive with Autodesk Revit ® Structure David Bleiman CEO, Rutherford & Chekene.
Quality Control for Autodesk® Revit® MEP Models
© 2012 Autodesk AutoCAD ® Virtualized and Digitized michael trachtenberg - AE BackOffice Software Director.
© 2012 Autodesk BIM on an Etch a Sketch Jose Guia Janitor extraordinaire
© 2011 Autodesk MA Photorealistic Rendering of Autodesk® Inventor® Designs Using Autodesk 3ds Max® 2012 and iray® Steven Schain Autodesk Certified.
© 2012 Autodesk No More Photo-CAD: Using an AutoCAD® Architecture Template with Autodesk® Impression for Presentations Dustin Fike, AIA Senior Associate.
© 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 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 Parametrics Master Class Martin Duke Business Systems Manager.
© 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.
© 2011 Autodesk Optimizing Digital Drawing Files and BIM Models for Measurement and Estimating Simon Lovegrove MRICS, AAIQS Director, Exactal.
© 2011 Autodesk Showcase your Inventor Models David Edward Gaskill CAD Designer or
© 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.
Join us on Twitter: #AU2013.  An appropriate image has been provided for your presentation based on the AU look and feel  You can replace the Title.
© 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 Support Your Design Process with the AutoCAD Map3D Interface to WindMil Using MultiSpeak Frank Misurec Stephen Brockwell Brockwell IT Consulting.
© 2012 Autodesk Pressure Pipe Networks in AutoCAD ® Civil 3D ® 2013 Matthew Anderson Technical Consultant, Autodesk Jim Paquette Software Development Manager.
© 2014 Autodesk Getting started with Desktop Subscription.
© 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.
© 2016 Autodesk What’s New in Autodesk ® AutoCAD Electrical 2017 Gaurav Sachdeva Product Manager.
AutoCAD® Civil 3D® Profile Views, Data Bands, and Styles
The Point For Coordination Module 1: Setting The Survey Point
Managing the Construction Administration Phase in Autodesk® Revit®
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
Are Your Buildings Floating in the Air
Autodesk Navisworks: Practical Tips and Tricks from Seven Years in the Construction Industry Josh Lowe Project Lead, TURIS Systems.
MP1483 Massing and using Architecture Models for Revit MEP 2013 Analysis Simon Whitbread Application Specialist.
The Family Lab Harlan Brumm Product Support Technical Lead.
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 CP5239 Demand-Loading AutoCAD®.NET Plug-ins James E. Johnson Synergis Software Sr. CAD Developer

© 2011 Autodesk Demand-Loading AutoCAD®.NET Plug-ins CP5239 This class will discuss and illustrate required registry settings for demand-loading a.NET or ObjectARX® plug-in. We will examine code samples that illustrate how to make an AutoCAD plug-in add the demand-load registry settings when it is first loaded and how to create a command that removes the registry settings. We will also discuss the new AutoCAD AutoLoader for automatic loading of ObjectARX and.NET plug-ins. This is an Intermediate Level Lecture…

© 2011 Autodesk Learning Objectives At the end of this class, you will be able to:  Setting demand-load registry settings  Manage demand-load registry settings from your code.  Prepare code and setups required for installers.  Use the AutoCAD AutoLoader to automatically load plug-ins.

© 2011 Autodesk Setting demand-load registry settings

© 2011 Autodesk Setting demand-load registry settings  Demand load settings are stored in one of two places in the registry:  HKEY_LOCAL_MACHINE (for all users requires privileges for installers)  HKEY_CURRENT_USER (for current user only) The decision on which will depend on if the application is to be shared across all users but also if using an installer that the user has privileges to write to HKEY_LOCAL_MACHINE.

© 2011 Autodesk Setting demand-load registry settings HKEY_LOCAL_MACHINE\Software\Autodesk\AutoCAD\R18.2\ACAD-A001:409 Under the Software\Autodesk\AutoCAD key is Release version key (e.g. R18.2) A001 is the product ID for AutoCAD is English version

© 2011 Autodesk Loading applications on AutoCAD Startup Under HKEY_LOCAL_MACHINE\Software\Autodesk\AutoCAD\R18.2\ACAD- A001:409\Applications we add a registry key for our application. This shows an application named CSharpPlugin added. With settings to demand load the application on startup.

© 2011 Autodesk Loading applications on AutoCAD Startup  A registry reg file could be created to create this file with the following contents, in the next section we will look at some code examples to create these settings with code and later with an installer: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.2\ACAD- A001:409\Applications\CSharpPlugin] "DESCRIPTION"="C# sample plugin" "LOADCTRLS"=dword: "LOADER"="C:\\Users\\Administrator\\Documents\\Visual Studio 2010\\Projects\\CSharpPlugin\\CSharpPlugin\\bin\\Release\\CSharpPlugin.dll" "MANAGED"=dword:

© 2011 Autodesk Loading applications on AutoCAD Startup "DESCRIPTION" is any text string to describe the application "LOADCTRLS" defines the action demand load action 0x01 Load the application upon detection of proxy object. 0x02 Load the application upon startup. 0x04 Load the application upon invocation of a command. 0x08 Load the application upon request by the user or another application. 0x10 Do not load the application. 0x20 Load the application transparently. A value of 2 like the sample ‘reg’ file contents will demand load the application on startup and is used to load the application when AutoCAD starts, a setting of 4 with some additional values will load on command invocation. These are the two settings most commonly used for.NET plugin applications.  "LOADER" must contain the location of the application  "MANAGED" must be set to 1 for.NET applications

© 2011 Autodesk Loading applications on AutoCAD Startup "DESCRIPTION" is any text string to describe the application "LOADCTRLS" defines the action demand load action 0x01 Load the application upon detection of proxy object. 0x02 Load the application upon startup. 0x04 Load the application upon invocation of a command. 0x08 Load the application upon request by the user or another application. 0x10 Do not load the application. 0x20 Load the application transparently. A value of 2 like the sample ‘reg’ file contents will demand load the application on startup and is used to load the application when AutoCAD starts, a setting of 4 with some additional values will load on command invocation. These are the two settings most commonly used for.NET plugin applications.  "LOADER" must contain the location of the application  "MANAGED" must be set to 1 for.NET applications

© 2011 Autodesk Loading applications on Command Invocation Creating a sub key under the Application key named commands allows setting up the demand loading to load the application on command invocation. Add string settings to the key for each command in the application that you want to be able to load the application... To load the command on invocation of the command you would set LOADCTRLS to 4 Add string settings to the key for

© 2011 Autodesk Loading applications on Command Invocation In addition to the “Commands” key you can also create a key named “Groups” then add string settings for any command groups that your application uses. The only group used in the example is LOADGROUP.

© 2011 Autodesk Loading applications on Command Invocation Note: In AutoCAD the DEMANDLOAD system variable controls the demand loading options of ObjectARX applications. The legitimate for the system variable may be used in combination. They are defined as follows:  0 Disables demand loading of all ObjectARX applications.  1 Enables demand loading of ObjectARX applications upon detection of proxy objects.  2 Enables demand loading of ObjectARX applications upon command invocation.  3 Enables demand loading for both proxy objects and command invocation

© 2011 Autodesk Manage demand-load registry settings from your code

© 2011 Autodesk Manage demand-load registry settings from your code In simple applications it is often easy to add code in the application to add or remove the demand load registry settings… Look at example code…

© 2011 Autodesk Prepare code and setups required for installers

© 2011 Autodesk Prepare code and setups required for installers To create demand loading in a setup project requires doing similar setup in your Setup project as we did above in the example demand loading code. In Visual Studio Create a new setup project and open the registry editor...

© 2011 Autodesk Prepare code and setups required for installers Under Applications key add a key for the name of the application this does not need to be the name of the DLL. Add string values for demand loading... Create registry ‘keys’ for each version of AutoCAD the application is targeted to run in... There are properties for not creating that may need to be set...

© 2011 Autodesk Use the AutoCAD® AutoLoader to automatically load plug-ins

© 2011 Autodesk Use the AutoCAD® AutoLoader to automatically load plug-ins A new feature with AutoCAD® 2012 is the plug-in auto loader mechanism which uses a package format to make deployment of custom applications easy. The package format is a folder with an extension of ‘.bundle’ in the folder is an XML file that defines the plug-in components and folders containing the application(s). This makes it easy to target multiple operating systems and product releases since the parameters of your plug-in are defined in the XML file. The plug-in defined by each package is loaded into AutoCAD by placing it in one of the ApplicationPlugins folders on your local drive.

© 2011 Autodesk Use the AutoCAD® AutoLoader to automatically load plug-ins There are two different ApplicationPlugins folders that you can use:  %ProgramFiles%\Autodesk\ApplicationPlugins (Any User)  %AppData%\Roaming\Autodesk\ApplicationPlugins (Only Current User) When AutoCAD starts, both ApplicationPlugins folders are checked for plug-in applications. Packages found are automatically registered and loaded based on the metadata in the XML file of each package.

© 2011 Autodesk Use the AutoCAD® AutoLoader to automatically load plug-ins In AutoCAD a command and a system variable are associated with the plug-in autoloader: APPAUTOLOADER - Command LIST - displays a list of plugins Reload - reloads plugins APPAUTOLOAD - System Variable (initial value = 14) The load behavior for plug-ins is controlled with this system variable  0 Do not load plug-in applications at any time  1 Display all messages when loading plug-in applications  2 Load plug-in applications at startup (initial)  4 Load plug-in applications when a new drawing is opened (initial)  8 Load plug-in applications when they appear in the plug-ins folder (initial) With a default setting of 14 plug-ins are automatically registered with AutoCAD and when a new plug-in is installed during the current session.

© 2011 Autodesk Use the AutoCAD® AutoLoader to automatically load plug-ins Sample Of a PackageContents.xml

© 2011 Autodesk Thanks for Attending…

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