Author Topic: Enhanced Polyline Tutorial - Part 2 - The Gathering  (Read 1837 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
Enhanced Polyline Tutorial - Part 2 - The Gathering
« on: April 10, 2009, 02:16:47 PM »
Setting up a flexible development environment is crucial with the many different versions of AutoCAD available.  Because of your companyís policy though you might not be developing for the latest, in fact you might be stuck developing for a version of AutoCAD that is 4 years old.  Using a couple tools found on the internet and runtimes from past MSVC versions you can code and compile using the latest version of MSVS.  Unfortunately, this tutorial is canít go into those details and some limits have to be set on the tools being used.  The tutorial will be developed against AutoCAD 2008 using MSVC 2005.  Iíll try and keep the code as portable across AC versions as possible, that away if youíre using AutoCAD 2004/05 and an older version of MSVC it should compile (no promises).  You will also need the Object ARX SDK.  To keep things easy Iíll use the 2008 version too.

As the title of the tutorial suggests we will be enhancing the built in polyline entity type of AcDbPolyline.  The final goal is to have a custom object that takes on all the properties of AcDbPolyline with the additional features of automatic offsets lines, each capable of being on their own layers.  The offset values and Layer Idís will be persisted with the overridden dwgOutFields and dwgInFields.  Other functions that will overridden are getGripPoints, moveGripPointsAt, and of course worldDraw.

I wonít be able to do a line by line or even function by function overview in the tutorial.  The amount of code weíre going to need just to support the above requirements is going to be substantial.  Iíll bring up some key items in the tutorial that I think need special attention, otherwise follow the comments in the supplied code.

Since the tutorial and source code will be coming in sections you should probably get a good diffíing program.  The one I like is WinDiff and can be downloaded here

Use the forums to post comments or ask questions.  As Iíve only done a handful of custom entities myself, and that work was done in a vacuum, Iíd really like to hear and see alternative / better methods.



  • Seagull
  • Posts: 17730
  • Have thousands of dwgs to process? Contact me.
Re: Enhanced Polyline Tutorial - Part 2 - The Gathering
« Reply #1 on: April 10, 2009, 02:25:45 PM »
WinDiff is a great program (ironically the compare page is kinda limp tho).

I've been using UltraCompare for years. Like UltraEdit, it's totally worth the price of admission IMO. :)
Engineering Technologist ē CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client ē ē


  • Guest
Re: Enhanced Polyline Tutorial - Part 2 - The Gathering
« Reply #2 on: April 11, 2009, 02:48:00 AM »
Downloading UltraCompare now.  The feature set looks impressive.



  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Enhanced Polyline Tutorial - Part 2 - The Gathering
« Reply #3 on: April 11, 2009, 04:28:12 AM »
UltraCompare and UltraEdit are both uber Nice.

Thanks for the effort with your Tutorial Paul !
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--