1 / 46

Thinking outside the Box with ObjectDBX ™

Thinking outside the Box with ObjectDBX ™. Speaker: Richard Binning Introduction Thinking About Interfaces Tools to be Used for interconnection VBA/ActiveX ObjectDBX XML Code Explorations Wrap-up and Questions. CP13-3. I am:. The CAD Coordinator for The Haskell Company

awillis
Download Presentation

Thinking outside the Box with ObjectDBX ™

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Thinking outside the Boxwith ObjectDBX™ Speaker: Richard Binning • Introduction • Thinking About Interfaces • Tools to be Used for interconnection • VBA/ActiveX • ObjectDBX • XML • Code Explorations • Wrap-up and Questions CP13-3

  2. I am: • The CAD Coordinator for The Haskell Company • Responsible for: • Best Practices • Training • Customization • Integration • Implementation • Liaison to: • Senior Management • Information Systems Department • AutoCAD Users

  3. Thinking Outside the Box? • What is the Box? • A Boundary? • A Limitation? • Interface: A boundary across which two systems communicate. An interface might be a hardware connector used to link to other devices, or it might be a convention used to allow communication between two software systems. Often there is some intermediate component between the two systems which connects their interfaces together. http://www.hyperdictionary.com/dictionary/interface

  4. Who Cares about the Box? • Design Professionals • Project Team Leaders • Extended Project Team Members • Real Estate Professionals • Fabrication Shops • Detailers • Estimators • Sub Contractors • Installers • ???

  5. Why do they Care? • 16% Loss in Pure Profit due to: • Incomplete Data Exchange • Delays in Data Exchange • Data Duplication Efforts • 40% of Total Project Costs Attributed to: • Repair • Maintenance • Warranty Costs

  6. This leads us to the following questions: • What Benefits can we achieve through better integration? • What problems and hurdles will we encounter? • Why should we choose to tackle this problem now? • How Can We Integrate our Project through Improved Data Sharing and Communication?

  7. Benefits to be achieved? • Retain a Greater Percent of Profits • Eliminate/Reduce Redundancy and Duplication • Shorten Life Cycles

  8. Problems to be Over-Come? • Greater Number of Software Applications • Coordination of Symbology and Abstraction • Data Re-purposed to friendly format

  9. When Can we Accomplish this? • Now • Mature Software • Improved APIs • Standardized Methods • Standardized Access Environments

  10. Project Integration Tools? • Visual Basic for Applications • ActiveX or COM • ObjectDBX Type Libraries • XML

  11. Project Integration Tools-VBA • VBA has some obvious advantages: • Run time Speed • Ease of Use • Built-In to favored products • Rapid Prototyping

  12. Project Integration Tools-ActiveX/COM • The Enabling Technology: • “Object” based interface • Both a Client and Controller Think of ActiveX as our invisible translator allowing all the other programming tools we will use to communicate with each other.

  13. Project Integration Tools-ObjectDBX • The Pipeline: • Direct Access to AutoCAD Database • Speed • Familiarity Stay Tuned for more…

  14. Project Integration Tools-XML • The Liberator: • Text Based • Human Readable • Structured • Two Flavors of Access • DOM – Powerful • SAX – Speedy & Safe Stay Tuned for more…

  15. ObjectDBX –What's New with 2004? • New Properties and Constants to Support: • Digital Signatures • True Colors • New Gradient Patterns • Hatch Object Types S • Shaded Plotting. • One New Viewport Scale (1-1/2" = 1'-0")

  16. ObjectDBX –What's New with 2004? • New Classes Provide Support for: • Changes to the Color System • File Dependencies and a built in Dependency Collection • Security Parameters • Summary Info (Formerly an extended drawing Properties dictionary)

  17. ObjectDBX - 2004 • Where Can I Use ObjectDBX? • Any PC that has an AutoCAD Application Installed • Must AutoCAD be Running? • Yes, but it can run in the background or invisibly • Do I have to Register it? • Not Anymore…still required for R15 • How Can I Use ObjectDBX? • Remember the Rules • Use what you already know

  18. ObjectDBX 2004 – The Rules • Think Objects • Declare them explicitly • Release them when you are done with them • Use Targeted Declarations • Always declare and bind them to the AXDBLib class • AXDBLib.(whatever you are accessing) • Good Habit for other Interfaces Too! • Forget About: • "ThisDrawing“ • Selection Sets • Utility Functions • The CommandLine/SendCommand

  19. ObjectDBX 2004 – What Can be Accessed? • All Database Resident Objects contained in the Drawing File • All AutoCAD Entities – Anything derived from AcadObject • Dictionaries • Built in Collections – Blocks and Attributes • AEC Objects, Styles, Schedule Data, etc. • ??? – Lets Find Out

  20. Working with DWG files ObjectDBX style • Launch AutoCAD • Command Line Approach • “VBANEW” • “VBAIDE” • Not “Alt-F11” • Menu Driven Approach • Load CAD Manager • Select Commands

  21. ObjectDBX style - cont. • Add Necessary Reference • New Class Module: “ObjectDBXDocument.cls” • Ensure Explicit Declarations • Select “Class” from Objects Selector • Create Skeleton – Initialize and Terminate • Create Binding Private Variable • Cleanup Function • A Method to pass Document Out • Various Collections

  22. ObjectDBX styleCls Code - 1. Demos…

  23. Thinking Outside the Box with XML • What is XML? • Text Based, Human Readable, Easy to Use • Where is XML being used? • Project Related Files with ADT & ABS • LandXML with LDDT • Palettes and Catalogs • ???

  24. Thinking Outside the Box with XML • XML Concepts and Rules: • Elements, Attributes • Elements Are: • Containers • Organized by Boundaries • Must Have an Opening or Start Tag • Must Have a Closing Tag delimited by slash • There can be only ONE ROOT

  25. Thinking Outside the Box with XML • Elements Are: • Case Sensitive • Cannot contain spaces • Cannot start with the letters "xml" or "XML" or any combination of the two • Must begin with an underbar "_" or a letter - no numbers! • Numbers are okay in any position except the first character... Periods and hyphens are okay too! • See Example

  26. Thinking Outside the Box with XML • Elements Example:

  27. Thinking Outside the Box with XML • Elements Relate to Each Other: • Siblings • Children • Parents

  28. Thinking Outside the Box with XML • XML Concepts and Rules: • Elements, Attributes • Attributes Are: • Name-Value Pairs contained within Element Start Tags

  29. Thinking Outside the Box with XML • Attribute Names Are: • Case Sensitive • Cannot start with the letters "xml" or "XML" or any combination of the two • Must begin with an underbar "_" or a letter - no numbers! • Numbers are okay in any position except the first character... Periods and hyphens are okay too! • Attribute Values Are: • Surrounded by Single or double quotes

  30. Thinking Outside the Box with XML • XML Summary:

  31. XML Access Tools • DOM – Document Object Model • Read/Write • Tree Look at XML • SAX – Simple Api for XML • Fairly Safe – Read Only • Event Driven

  32. XML Access Tools • Which one to use??? • Use the SAX Parser to: • Open Very Large Documents. • Quickly Access Elements contained in your file • If you only want to read the data. • Use the DOM Parser to: • Open Normal Sized Documents. • Modify Data Contained in Your File. • If you need to create new XML files. • When you need random access to the data.

  33. Working with XML files DOM style • Install MSMXL Parser • Launch AutoCAD • Command Line Approach • “VBANEW” • “VBAIDE” • Not “Alt-F11” • Menu Driven Approach • Load CAD Manager • Select Commands

  34. XML files DOM style - cont. • Add Necessary Reference • New Class Module: “XMLDomDocument.cls” • Ensure Explicit Declarations • Select “Class” from Objects Selector • Create Skeleton – Initialize and Terminate • Create Binding Private Variable • Cleanup Function • A Method to pass Document Out • Various Collections

  35. DOM style –Cont. • Class Code:

  36. DOM style –Cont. • Module Code:

  37. DOM style –Cont. • Module Code: • Run Code…

  38. Working with XML files SAX style • Install MSMXL Parser • Launch Microsoft Excel • Launch the VBA Editor • Add the Reference to MSXML4.0 • New Class Module: “XML_SaxDocument.cls” • Ensure Explicit Declarations • Add the code shown on the following slides to implement the interface described by SAX

  39. SAX style –Cont. • Class Code:

  40. SAX style –Cont. • Class Code:

  41. SAX style –Cont. • Class Code:

  42. SAX style –Demo. • Run Code:

  43. IN Summary • Talked about Project Members • Thinking About Interfaces not Boundaries • Tools to be Used for interconnection • VBA/ActiveX • ObjectDBX • XML • Code Explorations • Inside and Outside AutoCAD’s Box

  44. Updates Will be Posted to AU Website

  45. MicroWeb For CP13-3 • Questions??? • http://www.integr-8.com/AU2003

More Related