This blog is to share information I have gathered while transitioning from R14 to ABS 2007 to R-MEP 2012 and any other noteworthy nerd type information.

Friday, September 26, 2008

2007 Warning of Opening an R14 Dwg Pop-up

Hello bloggers!

With the help of some knowledgeable people on AUGI.com (thank you Lions60 & rkmcswain!!) I believe I have a solid working version of this pop-up that we've been needing.

Here's what it does: When opening a dwg (be it read-only or a full on open) this pop-up will appear if the dwg is any version below 2007). The pop-up will state what version the dwg is and ask if you really want to open. If you press cancel it closes that dwg out, but all other dwgs that you have open in that session are unaffected. If you press open, it will go ahead and let you open the dwg as you had chosen (either full on or read-only depending upon what you picked in the beginning). If you try to click on the "x" button to close out of the dialog box it will not work. The user is forced to either choose cancel or open. The cancel button is set as the default choice, so if the user just hits the enter key it will be selecting cancel and close the dwg out.

I have also have it showing an image on the dialog box (just for fun). That's a whole different post on how to do that....I had never made a slide before so that was a learning experience all on its own.

If you decide for some reason that you would like to use this code (LSP and/or DCL), or any portion of it please make sure you credit me for it.

Thank you!

Here is the DCL File:

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// This program is designed to be used with the acaddoc.lsp file.// They are to be stored locally on the users' machine under the product's support file area.// I.E.: C:Program Files_Autodesk Building Systems 2007_Support// This program uses the slide image "WarnImage.sld" that is stored here: F:HBEDT2K7_Setup// It was created to pop-up a warning when a dwg of a lower version is opened in a 2007 product.// The user will get a choice to cancel out of the open, or go ahead with the open.// Currently this pop-up will appear if the file is opened full out or read-only.// It will not affect any dwgs that are already open in that session of Acad (ADT or ABS).// Please do not use-alter-modify this file without contacting Abbie Meador first.// Created by Abbie Meador.// Last modified on 09-26-08 by Abbie Meador./////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

: paragraph { //Begins a paragraph of text : text { key = "mytile"; } //Calls the tile created in the LSP to print out in a text line : text_part { label = "Verify this file is Read-only before clicking 'Open' (Check the header)."; } : text_part { label = "If you ignore this warning and end up saving this as a 2007 dwg,"; } : text_part { label = "YOU WILL REPAIR THIS FILE ON YOUR OWN TIME!!"; } } //End paragraph of text } //End of row

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; This program is designed to be used with the warnr14.dcl file.;; They are to be stored locally on the users' machine under the product's support file area.;; I.E.: C:Program Files_Autodesk Building Systems 2007_Support;; This program uses the slide image "WarnImage.sld" that is stored here: F:HBEDT2K7_Setup;; It was created to pop-up a warning when a dwg of a lower version is opened in a 2007 product.;; The user will get a choice to cancel out of the open, or go ahead with the open.;; Currently this pop-up will appear if the file is opened full out or read-only.;; It will not affect any dwgs that are already open in that session of Acad (ADT or ABS).;; Please do not use-alter-modify this file without contacting Abbie Meador first.;; Created by Abbie Meador.;; Last modified on 09-26-08 by Abbie Meador.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(action_tile "accept" "(unload_dialog)") ;;Closes dialog and leaves dwg open if Open button from DCL is clicked (action_tile "cancel" "(done_dialog)") ;;Closes dialog and dwg if Cancel button from DCL is clicked

(set_tile "mytile" (strcat "YOU JUST OPENED AN " acadv " DWG IN 2007.")) ;;Creates tile to be used on DCL that shows version variable info