Hi,
After reading through some post I've came upon your excellent script for extracting block attributes into Access database. In one of the posts you gave an example of how a message box (warning of over-writing existing entries) could be implemented by replacing some code.
I tried doing this but whilst it still works I get no pop-up message box. Being a complete beginner I don't really know what to look out for / troubleshoot.
If possible could glance over the code I've pasted and perhaps highlight where I've gone wrong.
Many Thanks in advance,
Andy.
<<<<Code Start>>>>
;;; A routine (and supporting functions) to extract
;;; attribute values from a block insert entity
;;; and insert the values into (or update the values
;;; in) a database. See the comments following the
;;; boilerplate for limitations and usage. NOTE that
;;; this routine is largely "data-driven" by the data
;;; immediately following the introductory comments.
;;; Few (if any) revisions should be required to change ;;; what the routine does.
;;; Copyright (C) 2002 by The Fleming Group
;;; Permission to use, copy, modify, and distribute this ;;; software for any purpose and without fee is hereby ;;; granted, provided that the above copyright notice ;;; appears in all copies and that both that copyright ;;; notice and the limited warranty and restricted ;;; rights notice below appear in all supporting ;;; documentation.
;;; THE FLEMING GROUP PROVIDES THIS PROGRAM "AS IS" AND WITH ;;; ALL FAULTS. THE FLEMING GROUP SPECIFICALLY DISCLAIMS ANY ;;; IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A ;;; PARTICULAR USE. THE FLEMING GROUP DOES NOT WARRANT THAT ;;; THE OPERATION OF THE PROGRAM WILL BE UNINTERRUPTED OR ;;; ERROR FREE.
;;; Revision history:
;;; Revision 1.0
;;; Jon Fleming
;;; February 21, 2002
;;; **************************************************************
;;; Revision 1.1 March 9, 2002 by JRF: Removed the need to ;;; set a global variable for which engine is being used to ;;; connect to the database. Note that this version now ;;; requires ADOLISP version 2.1 or later.
;;; Revision 1.2 May 19, 2002 by JRF: fixed using the wrong ;;; syntax for the vla-startundomark and vla-endundomark ;;; functions.
;;; Revision 1.3 May 24 2002 by JRF: Fixed a bug that caused ;;; the alert box to appear even when ADILISP_Library.lsp ;;; was loaded succesfully.
;;; Revision 1.4 April 13, 2003 by JRF: Fixed a bug with ;;; retrieving attribute values when teh attribute tag ;;; was listed in the global list with lower case ;;; characters.
;;; Limitations:
;;; REQUIRES AutoCAD 2000 or higher.
;;; REQUIRES ADOLISP_Library.LSP version 2.1 or
;;; higher, available from
;;; http://www.fleming-group.com on the download page.
;;; ONLY TEXT DATA FIELDS IN THE DATABASE ARE SUPPORTED! ;;; There may be non-text data fields in the database ;;; that are not linked with attributes,but this routine ;;; cannot update or insert non-text fields.
;;; ************************************************************
;;; Usage:
;;; At the AutoCAD "command" prompt, or from a menu macro:
;;; ado-attdb
;;; From AutoLISP:
;;; (c:ado-attdb)
;;; Return value:
;;; none.
;;; ***********************************************************************
;;; Set up a global list that determines much of how this ;;; routine works
(setq #ADO-AttDBData
'(
;; A string that tells us how to connect to
;; the database.
;; Either an OLEDB Connection String or the
;; name of a UDL file (including the ".udl").
;; UDL files may be created with the DBCONNECT
;; command in AutoCAD. See the documentation
;; of ADOLISP_Library for some examples of
;; connect strings.
;; NEVER put an un-required space in a connection
;; string!
;; The following shows how to
;; use the Jet engine for Microsoft Access.
("ConnectionSpec"
After reading through some post I've came upon your excellent script for extracting block attributes into Access database. In one of the posts you gave an example of how a message box (warning of over-writing existing entries) could be implemented by replacing some code.
I tried doing this but whilst it still works I get no pop-up message box. Being a complete beginner I don't really know what to look out for / troubleshoot.
If possible could glance over the code I've pasted and perhaps highlight where I've gone wrong.
Many Thanks in advance,
Andy.
<<<<Code Start>>>>
;;; A routine (and supporting functions) to extract
;;; attribute values from a block insert entity
;;; and insert the values into (or update the values
;;; in) a database. See the comments following the
;;; boilerplate for limitations and usage. NOTE that
;;; this routine is largely "data-driven" by the data
;;; immediately following the introductory comments.
;;; Few (if any) revisions should be required to change ;;; what the routine does.
;;; Copyright (C) 2002 by The Fleming Group
;;; Permission to use, copy, modify, and distribute this ;;; software for any purpose and without fee is hereby ;;; granted, provided that the above copyright notice ;;; appears in all copies and that both that copyright ;;; notice and the limited warranty and restricted ;;; rights notice below appear in all supporting ;;; documentation.
;;; THE FLEMING GROUP PROVIDES THIS PROGRAM "AS IS" AND WITH ;;; ALL FAULTS. THE FLEMING GROUP SPECIFICALLY DISCLAIMS ANY ;;; IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A ;;; PARTICULAR USE. THE FLEMING GROUP DOES NOT WARRANT THAT ;;; THE OPERATION OF THE PROGRAM WILL BE UNINTERRUPTED OR ;;; ERROR FREE.
;;; Revision history:
;;; Revision 1.0
;;; Jon Fleming
;;; February 21, 2002
;;; **************************************************************
;;; Revision 1.1 March 9, 2002 by JRF: Removed the need to ;;; set a global variable for which engine is being used to ;;; connect to the database. Note that this version now ;;; requires ADOLISP version 2.1 or later.
;;; Revision 1.2 May 19, 2002 by JRF: fixed using the wrong ;;; syntax for the vla-startundomark and vla-endundomark ;;; functions.
;;; Revision 1.3 May 24 2002 by JRF: Fixed a bug that caused ;;; the alert box to appear even when ADILISP_Library.lsp ;;; was loaded succesfully.
;;; Revision 1.4 April 13, 2003 by JRF: Fixed a bug with ;;; retrieving attribute values when teh attribute tag ;;; was listed in the global list with lower case ;;; characters.
;;; Limitations:
;;; REQUIRES AutoCAD 2000 or higher.
;;; REQUIRES ADOLISP_Library.LSP version 2.1 or
;;; higher, available from
;;; http://www.fleming-group.com on the download page.
;;; ONLY TEXT DATA FIELDS IN THE DATABASE ARE SUPPORTED! ;;; There may be non-text data fields in the database ;;; that are not linked with attributes,but this routine ;;; cannot update or insert non-text fields.
;;; ************************************************************
;;; Usage:
;;; At the AutoCAD "command" prompt, or from a menu macro:
;;; ado-attdb
;;; From AutoLISP:
;;; (c:ado-attdb)
;;; Return value:
;;; none.
;;; ***********************************************************************
;;; Set up a global list that determines much of how this ;;; routine works
(setq #ADO-AttDBData
'(
;; A string that tells us how to connect to
;; the database.
;; Either an OLEDB Connection String or the
;; name of a UDL file (including the ".udl").
;; UDL files may be created with the DBCONNECT
;; command in AutoCAD. See the documentation
;; of ADOLISP_Library for some examples of
;; connect strings.
;; NEVER put an un-required space in a connection
;; string!
;; The following shows how to
;; use the Jet engine for Microsoft Access.
("ConnectionSpec"