CP433-4 - Managing CAD Standards with VB.NET Lee Ambrosius – Autodesk, Inc. Sr. Technical Writer – AutoCAD/AutoCAD LT/ AutoCAD for Mac Image courtesy of.

Slides:



Advertisements
Similar presentations
Brown University Swim Center
Advertisements

© 2013 Autodesk Preparing Apps for the Store: Guidelines Autodesk Exchange for Autodesk ® Revit ®
CP308-1L: Working with Actions and the Action Recorder Lee Ambrosius Autodesk, Inc Sr. Technical Writer.
© 2012 Autodesk AV4672-V - Using Autodesk® 3ds Max® Design, Autodesk Revit®, and iray® to Render Compelling Photographic Scenes Steven Schain Autodesk.
Every Building Has Its Price: Finding It with Autodesk® Navisworks® Manage 2014 Quantification Jason Dodds President, DFourInc.
© 2012 Autodesk Presenter’s First and Last Name Presenter’s Title AutoCAD ® Architecture 2013 What’s New Image courtesy of Wilson Architects.
© 2012 Autodesk DWS – Drafting While Standardized CM1535-R G. Lamar Crowe CAD Manager / Asset Management Coordinator
© 2012 Autodesk AC2075-L - AutoCAD® Customization Boot Camp: No Experience Required Lee Ambrosius – Autodesk, Inc. Principal Content Developer – IPG- AutoCAD.
© 2011 Autodesk Capitalize on Corridor Improvements in AutoCAD ® Civil 3D ® Don Quinn Civil Engineer / Eagle Point Product Specialist.
© 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 AC AutoCAD® Customization Boot Camp: No Experience Required Lee Ambrosius – Autodesk, Inc. Sr. Technical Writer – PSEB User Assistance.
© 2011 Autodesk Navigating Through the Corridor using AutoCAD® Civil 3D®.NET API Augusto Goncalves Senior Developer Consultant at Autodesk.
© 2010 Autodesk Autodesk Structural Curriculum 2013 Unit 1: Introduction to Structural BIM Building Information Modeling.
© 2012 Autodesk AC2724 – 2D Parametrics in AutoCAD® and Why You Need to Use Them Rick Ellis President, Cadapult Software Solutions
© 2012 Autodesk Dario Nicolini Product Manager Autodesk ® Inventor ® iLogic: a great Autodesk tool to improve Inventor features.
© 2011 Autodesk Shop Drawings in Autodesk® Revit®. What? It can Do That? Ron Palma Application Specialist.
© 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.
© 2011 Autodesk CP5239 Demand-Loading AutoCAD®.NET Plug-ins James E. Johnson Synergis Software Sr. CAD Developer.
Slope It, Slope It Good: Sloping Framing in Autodesk® Revit® Structure
© 2012 Autodesk AC It's a Plug-in. It's an App. It's Autodesk® Exchange Apps! Karen Mason Principal User Experience Designer, Autodesk.
© 2011 Autodesk SE4186: Getting Productive with Autodesk Revit ® Structure David Bleiman CEO, Rutherford & Chekene.
© 2011 Autodesk High-End Infrastructure Modeling with Low-Cost Tools: Introducing AutoCAD® Map 3D 2012 Bradford Heasley, GISP Vice President, Brockwell.
© 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 How to Excel at Data Extraction Martin Duke CADD Manager – Aurecon - Queensland.
© 2011 Autodesk Mechanical Simulation in AutoCAD ® 2012 Craig A. Miller – Pennsylvania College of Technology CAD Technology Specialist.
© 2011 Autodesk DM2480: Maximizing Autodesk ® Vault Verticals (Workgroup, Collaboration and Professional) Allen Gager KHS USA, Sarasota FL Image courtesy.
© 2012 Autodesk Dirty Laundry: Cleaning Up Your Sheets with AutoCAD® Sheet Set Manager Tim Douglas Boise Sales Manager at ProSoft.
© 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.
Join the conversation #AU2015. Class summary text goes here Class summary #AU2015.
© 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.
© 2014 Autodesk What’s New in Autodesk ® Advance Steel 2015 Presenter Name Presenter Title.
© 2012 Autodesk From Nothing to Something using AutoCAD ® Electrical Todd Schmoock Solutions Engineer - Synergis Technologies, Inc.
Rockin’ Hot Revit MEP 2011 Tips David Butts BIM Analyst – MEP – Gannet Fleming Image courtesy of Hobart, Yañez, Ramos, Maguey, and Martínez.
© 2011 Autodesk Importing the Most Useful Data Into Survey in AutoCAD Civil 3D 2012 Russ Nicloy Civil Applications Engineer.
© 2012 Autodesk AC4483-R - Extending the Power of AutoCAD® with Autodesk® Exchange Apps Karen Mason Principal User Experience Designer, Autodesk.
Join us on Twitter: #AU2014. Class summary text goes here Class summary.
© 2011 Autodesk Showcase your Inventor Models David Edward Gaskill CAD Designer or
Join us on Twitter: #AU2013 Building Well-Performing Autodesk® AutoCAD® Applications Albert Szilvasy Software Architect.
© 2012 Autodesk Have a tablet? The handout is available for iBooks, Kindle, and Adliko.
© 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.
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.
HIG – Self publishing process Scope and plan Jay Zhang, Gabriel He March 4, 2014.
© 2011 Autodesk The Suite Life of AutoCAD® Guillermo Melantoni Sr Product Manager: Workflows and Interoperability at Autodesk.
© 2012 Autodesk Autodesk® Civil 3D® 3D Studio Max Design®: Civil View For All Vincent Sheehan Sr. Designer, Timmons Group.
© 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.
© 2012 Autodesk Gordon Luckett – Municipal Asset Management with Autodesk® Software Gordon Luckett GIS Consultant, Developer.
© 2014 Autodesk Getting started with Desktop Subscription.
© 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.
© 2012 Autodesk The new AUGI UGA / UG Handbook Shaun Bryant Director, AUGI Board of Directors.
The Point For Coordination Module 1: Setting The Survey Point
Step it up a Rung from AutoCAD® Designs to AutoCAD® Electrical (MA4762-L) Todd Schmoock Solutions Engineer - Synergis Technologies, Inc.
Check Out These ‘Suite’ Workflows
Using Scripts, AutoLISP® and
CM1847 Migrating AutoCAD Standards to Revit
BIM for Interiors: Making Autodesk® Revit® Work for You
The Family Lab Harlan Brumm Product Support Technical Lead.
Presentation transcript:

CP Managing CAD Standards with VB.NET Lee Ambrosius – Autodesk, Inc. Sr. Technical Writer – AutoCAD/AutoCAD LT/ AutoCAD for Mac Image courtesy of Hobart, Yañez, Ramos, Maguey, and Martínez

Where Am I and Who Should Be Here You are in session: CP Managing CAD Standards with VB.NET You should know or have the following to get the most out of this session:  AutoCAD 2011 (or AutoCAD 2007 and later)  CAD Standards and/or the Batch Standards Checker  Visual Studio and VB.NET

Overview AutoCAD ships with a COM library that allows you to implement a custom CAD Standards plug-in.  In this session, you will:  Learn to define a plug-in  Load and use a plug-in  Explore the differences between a non-graphical and graphical plug-in

Who Am I? My name is Lee Ambrosius  AutoCAD user for over 15 years ago; started on R12 DOS  Sr. Technical Writer at Autodesk for AutoCAD/AutoCAD LT/AutoCAD for Mac  Author of AutoCAD related books and articles  AutoCAD 2009 and AutoCAD LT 2009 All-in-one Desk Reference for Dummies  AutoCAD D Modeling Workbook for Dummies  AUGI World and AUGI Hotnews  White Papers for Autodesk

Session Rules A few rules for this session:  Silent your cell phone  If you have to leave at anytime, please do so quietly  I will allow time to ask questions during the session unless we start getting behind Thanks for Your Cooperation

What is Going to be Covered  Learn What is Needed Before Getting Started  Create a Basic VB.NET Project for a Plug-in  Anatomy or Basics of a Plug-in  Load and Use a Plug-in  Look at a Graphical Plug-in  Debug a Plug-in

What You Need Before Getting Started  ObjectARX Software Development Kit (SDK)  Development Environment  Visual Studio.NET 2008  Visual Basic 2008 Express Edition  AutoCAD Managed.NET Developer’s Guide  AutoCAD ActiveX Reference Guide  Windows SDK  Only needed if using Visual Basic 2008 Express Edition

What You Need Before Getting Started After everything is installed, you need to create an Interop Assembly of the CAD Standards Type Library. 1. Display the Visual Studio 2008 Command Prompt 2. Type cd "c:\ObjectARX 2011\inc-win32" and press Enter 3. Type tlbimp acstmgr.tlb and press Enter The file AcStMgr.dll will be added to the inc-win32 folder. This only needs to be done once.

Defining a Plug-in A CAD Standard plug-in is based on the Class Library template. 1. Create a new project using the Class Library template 2. Reference the following libraries from the ObjectARX SDK:  AcStMgr.dll – CAD Standards Manager library  Axdb18enu.tlb – AutoCAD ActiveX/COM library 3. Reference the COM library Microsoft XML Type library (Microsoft XML, v6.0) – Used for reporting in the Batch Standards Checker 4. Check Make Assembly COM-Visible under Assembly Information.

Basics of a CAD Standards API The IAcStPlugin2 interface is used to implement a CAD Standard plug-in. Implemented methods and properties being in the following categories:  CAD Standard properties  Initialization  Error iterations; an error being a standards violation  Retrieve errors and fixes  Fix errors  Report errors

CAD Standard properties Each plug-in must support a standard set of properties that help to identify it from other loaded plug-ins. The properties you must support are:  Author  Description  HRef  Icon  Name  Version

Initialization The initialization of the plug-in is the very first thing that happens. A plug-in is initialized during one of the following conditions:  Opening of a drawing with an associated DWS file and the plug- in and real-time checking are enabled  Enabling a plug-in in the CAD Standards dialog box or the Batch Standards Checker The following methods must be implemented for initialization:  Initialize  SetupForAudit

Error iterations Before errors can be fixed, they must be identified and then handled one at a time. The following methods are used to identify and step through each error in a drawing against a DWS file:  SetContext  Start  Next  Done  Clear

Retrieve errors and fixes After an error has been identified, you then get the opportunity to display all possible fixes and the recommended fix. The following methods are used to get the current error being looked at, all available fixes, the recommended fix based on the current error, and display the property differences for the error and selected fix:  GetError  GetAllFixes  GetRecommendedFix  GetPropertyDiffs

Fix errors Once the user has determined the appropriate fix or an automatic fix can be applied, the FixError method is called. The revised properties need to be assigned to the bad (error) object and the error object needs to be updated corrrectly if the fix was applied.

Report errors Most reporting is handled by the CAD Standards framework or the Batch Standards Checker. However, you need to call the WritePluginInfo method to populate the information about your plug-in for the Batch Standards Checker report. There is also something else what seems to be a limitation of the API. You need to handle writing out the information about the standards you are using to check against the drawing for you plug-in.

Other Methods to Implement You need to implement the following even though they are not used:  CheckSysvar  StampDatabase

Load and Use a Plug-in After the plug-in has been created and built, you still have some work to do to get AutoCAD to load it. The Plug-in needs to be registered with:  Windows – Using RegAsm.exe  AutoCAD – Using a Registry key

Load and Use a Plug-in Once loaded, you should test your plug-in under the following situations:  CAD Standards checking in AutoCAD  Automatic fixes when checking standards in AutoCAD  Real-time checking in AutoCAD, notifications  Batch Standards Checker

Create a Graphical Plug-in Fundamentally there is no difference between a non-graphical and graphical CAD Standard plug-in other than how you validate an error and available fixes. The following needs to be changed for each plug-in if starting from the samples:  Change the helper classes StandardsHelp.vb  Class name, ProgId, a few of the global variables  Description() and Name() properties  GetObjectFilter() and SetupForAudit() methods  PlugIn_Next() and PlugIn_Clear() methods  GetAllFixes()and GetRecommendedFix() methods  FixError() method and WriteStandardsItemsInfo() methods

Debugging a Plug-in A plug-in can be debugged if you are using Visual Studio (VS) 2008, not Visual Basic 2008 Express. Do the following to debug a plug-in in AutoCAD: 1. Add a reference path to the inc-win32 folder in the ObjectARX SDK. 2. Specify the location of AutoCAD so it is started when debugging begins. Add your breakpoints to the code in VS Register the debug version of the DLL built and the plug-in with AutoCAD through the Registry. 4. Add a DWS file to the drawing to be checked and enable the plug-in for checking. Start checking the drawing file.

Final Questions Questions Going Once… Going Twice…

Closing Remarks Thanks for choosing this session, and do not forget to fill out the evaluation. If you have any further questions, I will be around for the week and can be reached at: twitter: Enjoy the rest of the conference.

Autodesk [and other] 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. © 2010 Autodesk, Inc. All rights reserved.