ADT/AutoCAD 2000 to R14 Custom Objects Clean-up

ADT/AutoCAD 2000 to R14 Custom Objects Clean-up

Anonymous
Not applicable
527 Views
5 Replies
Message 1 of 6

ADT/AutoCAD 2000 to R14 Custom Objects Clean-up

Anonymous
Not applicable
Dear Customization Newsgroup Readers,

We are writing a routine to convert ADT/AutoCAD 2000 drawing files to
AutoCAD R14 format by eliminating all custom objects to avoid that Proxy
Objects R14's dialog box when our customers open our files.

We do not want to use the AutoCAD Batch Convert Migration Tool because it
did not clean-up those custom objects when it convert a file from AutoCAD
2000 to R14. We want to solve this problem with a Visual LISP / Visual BASIC
routine.

We concept a first code, writen below, and We are almost there. When We run
this code, all the ADT dictionaries and the most part of AutoCAD 2000
dictionaries are cleaned. However, some ACAD dictionaries and applications
are not removed from database. They are:

ACAD_LAYOUT
ACAD_PLOTSETTINGS
ACAD_PLOTSTYLENAME
ACDBHEADERROUNDTRIPXREC
ACDBVARIABLEDICTIONARY

We discoverd which they are when we open an example DWG file in R14 and then
save it for AutoCAD R12.

In that example DWG file, our routine clean-up correctly these dictionaries
from database:

AEC_2D_SECTION_STYLES
AEC_AREA_GROUP_DEFS
AEC_AREA_MODIFIERS
AEC_AREA_PROPOSALNAMES
AEC_AREA_STYLES
AEC_AREAGROUP_STYLES
AEC_CLEANUP_GROUP_DEFS
AEC_CURTAIN_WALL_LAYOUT_STYLES
AEC_CURTAIN_WALL_UNIT_STYLES
AEC_DIM_STYLES
AEC_DISP_REP_CONFIGURATIONS
AEC_DISP_REP_SETS
AEC_DISP_REPS
AEC_DISPLAY_PROPS_DEFAULTS
AEC_DOOR_STYLES
AEC_ENDCAP_STYLES
AEC_MASKBLOCK_DEFS
AEC_MVBLOCK_DEFS
AEC_POLYGON_STYLES
AEC_PROFILE_DEFS
AEC_PROPERTY_FORMAT_DEFS
AEC_PROPERTY_SET_DEFS
AEC_RAILING_STYLES
AEC_ROOFSLAB_STYLES
AEC_ROOFSLABEDGE_STYLES
AEC_SCHEDULE_TABLE_STYLES
AEC_SLAB_STYLES
AEC_SLABEDGE_STYLES
AEC_SPACE_STYLES
AEC_STAIR_STYLES
AEC_STRUCTURALMEMBER_STYLES
AEC_VARS
AEC_WALL_STYLES
AEC_WALLMOD_STYLES
AEC_WINDOW_ASSEMBLY_STYLES
AEC_WINDOW_STYLES

How can we clean-up those 5 ACAD dictionaries from database?

Best regards,

Everton Garcia
Casaflex Ideas and Projects Ltd.

;;; ------------------------------------------------------------------------
-----------------------------------
;;; ROUTINE DEVELOPED BY EVERTON GARCIA - CASAFLEX IDEAS AND PROJECTS LTD.
;;; Copyright © 2002 - All Rights Reserved

(defun c:greca ()
(vl-load-com)
(prompt "\n\eSelecting Object for Conversion\e |...")
(setq kpol (vlax-get-Acad-Object)
)
(setq CfDictAntigoDwg
(vla-get-dictionaries
(vla-get-ActiveDocument
(vlax-get-Acad-Object)
)
)
NMCfDictAntigoDwg
(vla-get-objectname CfDictAntigoDwg)
CfDictAntigoDwgCount
(vla-get-count CfDictAntigoDwg)
AcadCfDictAntigoDwg
(vlax-vla-object->ename CfDictAntigoDwg)
CfFndDict 1
)
;;; ---> Start of External Loop <---
(if (> CfDictAntigoDwgCount 0)
(progn
(vlax-for 1ItemDict CfDictAntigoDwg
(setq Nv1ItemDic 1ItemDict
AcadNv1ItemDic (vlax-vla-object->ename Nv1ItemDic)
NMNv1ItemDic (vla-get-objectname Nv1ItemDic)
1ItemDicCount (vla-get-count Nv1ItemDic)
)
;;; ---> Start of Internal LOOP <---
(if (> 1ItemDicCount 0)
(progn
(vlax-for 2ItemDict Nv1ItemDic
(setq Nv2ItemDict 2ItemDict
AcadNv2ItemDict (vlax-vla-object->ename Nv2ItemDict)
NMNv2ItemDic (vla-get-objectname Nv2ItemDict)
)
(dictremove (namedobjdict) NMNv2ItemDic)
(setq RmvAcadNv2ItemDict (entdel AcadNv2ItemDict))
(if (/= RmvAcadNv2ItemDict nil)
(prompt (strcat "\nEntity " NMNv2ItemDic " Deleted"))
) ;if
);vla-for
)
);if
;;; ---> End of Internal Loop <---
(dictremove (namedobjdict) NMNv1ItemDic)
(entdel AcadNv1ItemDic)
(prompt (strcat "\nEntity " NMNv1ItemDic " Deleted"))
);vla-for
)
);if
(entdel AcadCfDictAntigoDwg)
(prompt (strcat "\nEntity " NMCfDictAntigoDwg " Deleted"))
;;; ---> End of External Loop <---
(prompt "\n\eUpdating Current Aplication Info\e /...")
(princ)
)

;;; ROUTINE DEVELOPED BY EVERTON GARCIA - CASAFLEX IDEAS AND PROJECTS LTD.
;;; Copyright © 2002 - All Rights Reserved
;;; ------------------------------------------------------------------------
-----------------------------------
0 Likes
528 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Dear Toni,

Try my SaveAsR14 routine. It uses the AecObjExplode routine written by
Autodesk for this very purpose. I think you'll find that AecObjExplode
works very well. Give it a try.

CJ Follmer
http://home.att.net/~cjenn


"Toni Fontenele" wrote in message
news:[email protected]...
> Dear Customization Newsgroup Readers,
>
> We are writing a routine to convert ADT/AutoCAD 2000 drawing files to
> AutoCAD R14 format by eliminating all custom objects to avoid that Proxy
> Objects R14's dialog box when our customers open our files.
>
> We do not want to use the AutoCAD Batch Convert Migration Tool because it
> did not clean-up those custom objects when it convert a file from AutoCAD
> 2000 to R14. We want to solve this problem with a Visual LISP / Visual
BASIC
> routine.
>
> We concept a first code, writen below, and We are almost there. When We
run
> this code, all the ADT dictionaries and the most part of AutoCAD 2000
> dictionaries are cleaned. However, some ACAD dictionaries and applications
> are not removed from database. They are:
>
> ACAD_LAYOUT
> ACAD_PLOTSETTINGS
> ACAD_PLOTSTYLENAME
> ACDBHEADERROUNDTRIPXREC
> ACDBVARIABLEDICTIONARY
>
> We discoverd which they are when we open an example DWG file in R14 and
then
> save it for AutoCAD R12.
>
> In that example DWG file, our routine clean-up correctly these
dictionaries
> from database:
>
> AEC_2D_SECTION_STYLES
> AEC_AREA_GROUP_DEFS
> AEC_AREA_MODIFIERS
> AEC_AREA_PROPOSALNAMES
> AEC_AREA_STYLES
> AEC_AREAGROUP_STYLES
> AEC_CLEANUP_GROUP_DEFS
> AEC_CURTAIN_WALL_LAYOUT_STYLES
> AEC_CURTAIN_WALL_UNIT_STYLES
> AEC_DIM_STYLES
> AEC_DISP_REP_CONFIGURATIONS
> AEC_DISP_REP_SETS
> AEC_DISP_REPS
> AEC_DISPLAY_PROPS_DEFAULTS
> AEC_DOOR_STYLES
> AEC_ENDCAP_STYLES
> AEC_MASKBLOCK_DEFS
> AEC_MVBLOCK_DEFS
> AEC_POLYGON_STYLES
> AEC_PROFILE_DEFS
> AEC_PROPERTY_FORMAT_DEFS
> AEC_PROPERTY_SET_DEFS
> AEC_RAILING_STYLES
> AEC_ROOFSLAB_STYLES
> AEC_ROOFSLABEDGE_STYLES
> AEC_SCHEDULE_TABLE_STYLES
> AEC_SLAB_STYLES
> AEC_SLABEDGE_STYLES
> AEC_SPACE_STYLES
> AEC_STAIR_STYLES
> AEC_STRUCTURALMEMBER_STYLES
> AEC_VARS
> AEC_WALL_STYLES
> AEC_WALLMOD_STYLES
> AEC_WINDOW_ASSEMBLY_STYLES
> AEC_WINDOW_STYLES
>
> How can we clean-up those 5 ACAD dictionaries from database?
>
> Best regards,
>
> Everton Garcia
> Casaflex Ideas and Projects Ltd.
>
>
;;; ------------------------------------------------------------------------
> -----------------------------------
> ;;; ROUTINE DEVELOPED BY EVERTON GARCIA - CASAFLEX IDEAS AND PROJECTS LTD.
> ;;; Copyright © 2002 - All Rights Reserved
>
> (defun c:greca ()
> (vl-load-com)
> (prompt "\n\eSelecting Object for Conversion\e |...")
> (setq kpol (vlax-get-Acad-Object)
> )
> (setq CfDictAntigoDwg
> (vla-get-dictionaries
> (vla-get-ActiveDocument
> (vlax-get-Acad-Object)
> )
> )
> NMCfDictAntigoDwg
> (vla-get-objectname CfDictAntigoDwg)
> CfDictAntigoDwgCount
> (vla-get-count CfDictAntigoDwg)
> AcadCfDictAntigoDwg
> (vlax-vla-object->ename CfDictAntigoDwg)
> CfFndDict 1
> )
> ;;; ---> Start of External Loop <---
> (if (> CfDictAntigoDwgCount 0)
> (progn
> (vlax-for 1ItemDict CfDictAntigoDwg
> (setq Nv1ItemDic 1ItemDict
> AcadNv1ItemDic (vlax-vla-object->ename Nv1ItemDic)
> NMNv1ItemDic (vla-get-objectname Nv1ItemDic)
> 1ItemDicCount (vla-get-count Nv1ItemDic)
> )
> ;;; ---> Start of Internal LOOP <---
> (if (> 1ItemDicCount 0)
> (progn
> (vlax-for 2ItemDict Nv1ItemDic
> (setq Nv2ItemDict 2ItemDict
> AcadNv2ItemDict (vlax-vla-object->ename Nv2ItemDict)
> NMNv2ItemDic (vla-get-objectname Nv2ItemDict)
> )
> (dictremove (namedobjdict) NMNv2ItemDic)
> (setq RmvAcadNv2ItemDict (entdel AcadNv2ItemDict))
> (if (/= RmvAcadNv2ItemDict nil)
> (prompt (strcat "\nEntity " NMNv2ItemDic " Deleted"))
> ) ;if
> );vla-for
> )
> );if
> ;;; ---> End of Internal Loop <---
> (dictremove (namedobjdict) NMNv1ItemDic)
> (entdel AcadNv1ItemDic)
> (prompt (strcat "\nEntity " NMNv1ItemDic " Deleted"))
> );vla-for
> )
> );if
> (entdel AcadCfDictAntigoDwg)
> (prompt (strcat "\nEntity " NMCfDictAntigoDwg " Deleted"))
> ;;; ---> End of External Loop <---
> (prompt "\n\eUpdating Current Aplication Info\e /...")
> (princ)
> )
>
> ;;; ROUTINE DEVELOPED BY EVERTON GARCIA - CASAFLEX IDEAS AND PROJECTS LTD.
> ;;; Copyright © 2002 - All Rights Reserved
>
;;; ------------------------------------------------------------------------
> -----------------------------------
>
>
0 Likes
Message 3 of 6

Anonymous
Not applicable
Dear Follmer,

The drawings was already "AEC-Exploded". Their object were flatten and
duplicated objects were removed with the Autodesk's Express Tools. Then, we
saved as R14 format. The problem is when our customer open the drawing in
AutoCAD, the proxy dialog box appears. Until now, we got to remove with
success from the drawing database all of the non-graphics dictionaries and
objects relative to AEC. The problem is the removal of the five specific
dictionaries and objects of AutoCAD 2000, listed in our first message.

Thanks for your help and congratulations for your SaveAsR14 routine. It's
very important to ADT users.

Best Regards,

Everton Garcia / Toni Fontenele
Casaflex Ideas and Projects Ltd.




"CJ Follmer" escreveu na mensagem
news:[email protected]...
> Dear Toni,
>
> Try my SaveAsR14 routine. It uses the AecObjExplode routine written by
> Autodesk for this very purpose. I think you'll find that AecObjExplode
> works very well. Give it a try.
>
> CJ Follmer
> http://home.att.net/~cjenn
0 Likes
Message 4 of 6

Anonymous
Not applicable
Toni,

If you ran AecObjExplode it would remove ALL databases and Proxy graphics.
You need to make sure you save the file immediately after running the
command or you risk repopulating the file with Aec Database information.

--
| Rob Starz
------------------------------------------------------
| president / dreamer
| Stardsign cad solutions
| 352.263.3786
| AEC Designer / Consultant / Developer
| Autodesk Architectural Desktop:
Tools: www.stardsign.com
Tech Support: www.stardsign.com/support.htm
Bring the Power of i-drop into AutoCAD with i-dock (coming soon)
0 Likes
Message 5 of 6

Anonymous
Not applicable
Rob,

Does AecObjectExplode remove the non-graphics databases and proxy objects
below?

ACAD_LAYOUT
ACAD_PLOTSETTINGS
ACAD_PLOTSTYLENAME
ACDBHEADERROUNDTRIPXREC
ACDBVARIABLEDICTIONARY

They are not AEC objects! I think they are AutoCAD 2000 related objects
which are not recognized by AutoCAD R14. We discover those objects when we
open a populated file into an AutoCAD R14 and save it in AutoCAD R12 format.
Then, we open that R12 file in AutoCAD R14, and all proxy objects had gone.

Toni.




"Rob Starz" escreveu na mensagem
news:[email protected]...
> Toni,
>
> If you ran AecObjExplode it would remove ALL databases and Proxy graphics.
> You need to make sure you save the file immediately after running the
> command or you risk repopulating the file with Aec Database information.
>
> --
> | Rob Starz
> ------------------------------------------------------
> | president / dreamer
> | Stardsign cad solutions
> | 352.263.3786
> | AEC Designer / Consultant / Developer
> | Autodesk Architectural Desktop:
> Tools: www.stardsign.com
> Tech Support: www.stardsign.com/support.htm
> Bring the Power of i-drop into AutoCAD with i-dock (coming
soon)
>
>
0 Likes
Message 6 of 6

Anonymous
Not applicable
I don't think they should cause A proxy graphic warning. Simply doing a
saveas r14 should either get rid of them or leave them dormant for round
trips.

I have not receive any proxy graphic dialogs opening a file in R14 I saved
as r14 from 2000. Have you?

--
| Rob Starz
------------------------------------------------------
| president / dreamer
| Stardsign cad solutions
| 352.263.3786
| AEC Designer / Consultant / Developer
| Autodesk Architectural Desktop:
Tools: www.stardsign.com
Tech Support: www.stardsign.com/support.htm
Bring the Power of i-drop into AutoCAD with i-dock (coming soon)
0 Likes