DGN Purge function not working after upgrade

DGN Purge function not working after upgrade

murmanator
Advocate Advocate
1,263 Views
2 Replies
Message 1 of 3

DGN Purge function not working after upgrade

murmanator
Advocate
Advocate

Hello, we are (finally) upgrading from 2013 to 2021 and in going through all our LISP programs this one is giving me trouble. Used to work in 2013, now is causing a fatal error in 2021. This is a program we use to purge out weird linetypes that we pick up from outside drawings. At the end we insert our template to get our layers and such back. The problem is in the red text part, if I comment that out no crash, but then no purge function. Is this a matter of the code, the file being loaded maybe incompatible or some other issue? Thanks for the help.

 

(defun c:LDGN ()
(command "qsave")
(if (setq dgnp (findfile "DgnLsPurge.dll"))
(command "._NETLOAD" dgnp "DGNPURGE")
)
(command "PURGE" "A" "*" "N")
(prompt "\nPURGE ALL COMPLETE!")
(command "-insert" "cpl cad template-1.dwg" "0,0" "1" "1" "0")
(command "erase" "l" "") ;; ERASES THE TEMPLATE IT JUST INSERTED
(command "qsave")
(princ)
)

0 Likes
Accepted solutions (1)
1,264 Views
2 Replies
Replies (2)
Message 2 of 3

cadffm
Consultant
Consultant
Accepted solution

Your dll is not compatible with 2021. In 2021 "DGNPURGE" is part of the normal PURGE / -PURGE command,

unused dgn linetypes  can clean by  "orphaned data" option.

http://help.autodesk.com/view/ACD/2021/ENU/?guid=GUID-C6B62BBD-C363-4DC7-AF43-036A7B287473

 

Or for automation -PURGE

http://help.autodesk.com/view/ACD/2021/ENU/?guid=GUID-C3876E92-3478-449C-8FAB-DA760B2EDD09

 

Sebastian

0 Likes
Message 3 of 3

murmanator
Advocate
Advocate

Yes, thanks I see now. Got it all fixed up.

0 Likes