Keynotes - Dynamic!

Started by jb, April 15, 2008, 04:56:02 AM

Previous topic - Next topic

jb

Did 2007 have mleaders?  If so this will work on 2007 forward.  It's been tested on 2008 and 2009.

I'm using the latest stable build: 4.1.2.1

This routine is in it's 4th incarnation - you may have seen earlier versions before.  I'm just going to show the whole routine for those that aren't "in the know".

Summary of Commands:

jbkeynotes - shows the main keynoting form.
jbKeyInfo - shows the xdata form.


This is a dynamic Keynoting routine.  All note definitions are contained in an external text document, edited with notepad.exe.  This is a tab delimited file; meaning that the key and the note are separated by a tab.  Very important: this is how the routine knows the difference.  "Divisions" are defined by an asterisk (*) and the number directly after the asterisk will be used to filter the keynotes (more on that later)



This is the main form.  (command :jbKeynotes) The tool tips are pretty extensive so I won't spend much time here.  One thing to know: I use ADT so the keyfile is tied to the project.  If you don't have ADT then just make sure the keyfile is located in the same folder as the drawing.  Add keyed annotation to the drawing by double-clicking the ListBox with the keynotes.  After selecting two points on screen the keynote is generated.  Hitting <enter> at this point will add another identical keynote.  Selecting different Divisions will filter the KeyList.  This is a modeless, re-sizable form.



If you pick the little button in the top left corner, the form rolls up:



OK, on to what this thing does.  You can generate 3 types of annotation: a Keynote, a Tagnote, or Mtext. Keynotes and Tagnotes are AutoCAD mleader objects:



A Keynote will require a corresponding KeyChart.  The form has buttons for generating a KeyChart or updating an existing chart if keynotes are added or deleted.  Only Keynote Objects will appear in the KeyChart.  The keychart is Mtext with Xdata attached:



Dynamic: whenever a drawing is opened, and the routine is loaded via an .mnl or acaddoc.lsp file, the drawing will be compared to the file. Any discrepancies will be changed automatically.  The file takes precedence over the drawing.  So what this means is you can have these notes in as many places in the project that you want; the client changed from brick to stucco?  No problem: change the keyfile and evertime a user opens a file it's automatically updated. (No more redlines  :wink:)

At anytime use the sync button on the form to "synchronise" the drawing and key file.  How does all this happen you ask?  Xdata.  The routine attaches Xdata to the annotation objects with the Key, Note and Object Type.  This is a little form to reveal that info: (command: jbKeyInfo)



OK, so lets say there is a keynote in the drawing but the project manager erased it from the file?  The "keyless" annotation will be turned red and Keynote Objects will have the key replaced with the note - so you know what's been deleted.



KeyChart Objects will always turn a different color on Syncing to alert the user to a possible change with the Keynote Objects.



Well, that's it.  Attached is the source code and opendcl form code.  There is a file, jb002-Public-Include.lsp, that should have all the external subs this routine uses.  Let me know if somethings missing.  Load up the lisp files and issue "jbkeynotes" command to bring up the main form and go from there.  All the mtext and mleader objects respect current style settings.  In the jb002-KeyNotes.lsp file you'll find the routines for generating the annotation objects.  Check out c:jbPlaceKeyNote and c:jbPlaceNote to see the changes I make to the Mleader object at the command line.  Other than that all style properties apply.  All objects are created using (command . . .) so if you have command reactors handling layering, your all set.

Feel free to hack and use what you like.  It's about half commented and the function names and vars are usually self explanatory.
James Buzbee
Managing Memeber
Black Horse Development, LLC

Kelie

James,

I remember this program used to be a hybrid of Lisp and VBA? Not it uses OpenDCL. Great!

Thank you!

jb

Thanks Kelie - have you ever used it??
James Buzbee
Managing Memeber
Black Horse Development, LLC

Marco Jacinto

James, I think the function (aeclayerkeylist) is missing, so I tweak the jb:GetADTVar funtion a litle and now your program works like a charm, I will atart using it, so I any comments I will let you know

The look of the dialog is great, thanks for sharing.

For those who are using 5.0.0.8 and up, remember to change the return value for the checkboxes in the c:jb002_00_KEYLIST_OnDblClicked function.

Saludos
Marco Jacinto

jb

Marco-

I thought I caught all the AEC stuff - thanks for catching that! 

Please keep me updated  ;)

jb
James Buzbee
Managing Memeber
Black Horse Development, LLC

Kelie

Quote from: jb on April 16, 2008, 09:09:19 AM
Thanks Kelie - have you ever used it??

Not yet. But I will now that you're using OpenDCL. I can use your program and at the same time learn OpenDCL.  :)

tombuck

I have the program running on Acad 2011 with OpenDCL 6.0.0.28 running.  The program is not finding the kb.key file even though it is located in the same folder as the drawing.

How do I point to the key file?  Will the program look for any key file or must it be named kb.key?

Thanks

jb

Ok, I've fixed a few bugs and revised the findfile function for kb.key: kb.key MUST be in AutoCAD's search path.  The width property for an mleader with an mtext "note" now uses the CANNOSCALE var . . . earlier versions will default to 96.0.

The download on the first post has been updated: jbKeynotes.v3.zip

Hope this helps.

James Buzbee
Managing Memeber
Black Horse Development, LLC

francinez

Hello
Im working with Autocad 2016 and I wanted to use your Keynotes tools.
On Autocad command I appload the file jb002-odcl.lsp but I get an error message:
Command: ; error: no function definition: DCL_FORM_ISACTIVE
Do you know why?
Thank
Francine

owenwengerd

Quote from: francinez on September 15, 2016, 01:52:02 AM
Command: ; error: no function definition: DCL_FORM_ISACTIVE
Do you know why?

You have to first install the OpenDCL Runtime. Current version is 8.1.0.0, available here:
Windows Installer .MSI