Author Topic: OpenDCL runtime Error  (Read 2103 times)

0 Members and 1 Guest are viewing this topic.

andy_lee

  • Newt
  • Posts: 147
OpenDCL runtime Error
« on: March 17, 2015, 11:16:14 PM »

OS: windows xp pro
OpenDCL.Runtime.7.0.0.9
AutoCAD 2007 & 2010



Code: [Select]
;;Author:DL_117
(setq numMain '("YWt6Ay8KAACoefnhBuLDKDUxLT9qgHR7OD/zWrh799f0r1a7LDVXUCJW5IZ+KjYmPjw01/bqHG7K"
"xB/39wVoljGO54Y2IpQ4bR2Cf4B+bXsJuIZ+wU3poJdDXPE6w0kJGMBHmeC54oeYoFP1dfWeLan4"
"vZY9RdDdZR3CDWa/TlhGqf838syRv0b46C5dmykOJ6ByBU0P+n7C1XxIzmk/A2xTZj5NrPYP6jjq"
"A2T9RrovfGe0bGLbptiuui9NzMLtqhfYGOIT/ERnpm5puxxti7ok+Cickt26U6o1J/VPlVX0KKBM"
"ZZulF5S4VmUa5cqIW9wMKvUv98Yk3KNwbTxn6FD0MklLdTKBeukc4pfnKdZTtOlqswf69S0ctzKn"
"sCBhZtHXCwbptuFXgrqfyfzhVIcdW4GfgieBrdaMPWgBxX1X+plFJc2tp+AgjUROcc0xp4P3tBxk"
"KAA5n9V0wT47N6ROkeuCJH6pG8bNwkOsccPSg5Y6YFmHtiBlGMcMEhEutSr4/CjBVVH7Xsh76+dk"
"50TcdSQrigLq4HW16M1yuCGk/dTKz0HphOVSA6YhbDGgl5ocoEIq2wXakhMqBtXNGYuN/xoUpK/7"
"duH1MlS5RfxIyD1OseOhR/dV24LoErdj/BnqoX20kUjruSf5oXYQDqaUOWug0YLBKobirTF0oNfI"
"FN3tAePcgt3skS+PC0ZibwIkuw04nwj7MVei1JyrKqTVqNH6JE38VapYwNlIjwP7SdE8y+KRsb1d"
"dPGEgD2NLIFPW8Hajv6MCS2fYPvNdKEshsi8A3Sxh5WZn3tp8SPBB2uhWYH2jQ7DBIHNtam0UVIN"
"VuptE+zXeANWKmGZv00/cPONJuaaFvz5PQCrvT/txUwGkJh1bxDAp6DrNhHPWIMkN8Bk9zU2RfVe"
"F2127LC4gcE3+y5OoAvuVFDGWC6ahOvBUbXppoWQYs0h5XKBCsyCP4bz0nHOQIyggwWag8xojBSM"
"gx0Mt4t1VbUxUw==")
)
;;(gxl-AutoLoadODclArx)
;;Function: Automatic loading OpenDcl
;;From Gu_xl
(defun autoLoadODclArx  (/ loaded fn v fnn)
(if (and
(not dcl_getversionex) ;OpenDcl NOT LOAD
(= 2 (boole 1 (getvar "DEMANDLOAD") 2))
)
(vl-catch-all-apply 'vl-cmdf (list "opendcl"))
)
(if (not dcl_getversionex)
(cond
((= "16" (setq v (itoa (atoi (getvar 'acadver)))))
(if (setq fnn (findfile (setq fn (strcat "opendcl." v ".arx"))))
(setq loaded (arxload fnn "1"))
(setq loaded "2")
)
)
((or (= "17" v) (= "18" v) (= "19" v))
(if (= "x86" (getenv "PROCESSOR_ARCHITECTURE"));32bit sys
(if (setq fnn
(findfile (setq fn (strcat "opendcl." v ".arx")))
)
(setq loaded (arxload fnn "1"))
(setq loaded "2")
)
;64bit sys
(if (setq fnn
(findfile (setq fn (strcat "opendcl.x64 ." v ".arx")))
)
(setq loaded (arxload fnn "1"))
(setq loaded "2")
)
)
)
(t (Setq loaded "2"))
)
(setq loaded "3")
)

(if (= "1" loaded)
(progn
(alert (strcat fn "Failed to load! Program will exit!"))
(exit)
)
(if (= "2" loaded)
(progn
(alert (strcat "Not found\"" fn "\"file!Program will exit!"))
(exit)
)
)
)

loaded
)
;;(gxl-Load_ODCL_Project projname reload password alias)
;;Function: loading OpenDcl file
;;From Gu_xl
(defun load_ODCL_Project
(projname reload password alias / bytes rtype Projects e)
(cond
((null dcl_project_import)
(prompt "OpenDCL not load...\n")
)
((= 'list (type projname))
(dcl_project_import projname password alias)
)
(
(and
(progn
(if (= ".LSP" (substr (strcase projname) (- (strlen projname) 3)))
(setq projname (substr projname 1 (- (strlen projname) 4)))
)
(if (/= ".ODCL"
(substr (strcase projname) (- (strlen projname) 4))
)
(setq projname (strcat projname ".odcl"))
)
(setq bytes (vl-get-resource projname))
)
(eq 'str (setq rtype (type bytes)))
(not (eq "" bytes))
)
(if reload
(dcl_project_import bytes password alias)
(if
(or
(not (setq Projects (dcl_GetProjects)))
(not (member (strcase (vl-filename-base projname))
(mapcar 'strcase Projects)
))
)
(dcl_project_import bytes password alias)
)
)
)

((if (not (VL-CATCH-ALL-ERROR-P
(setq e (VL-CATCH-ALL-APPLY
'dcl_project_load
(list (findfile projname) reload alias)
))))
e
))
)
)

(defun dxf (ent n)
(if (= (type ent) 'ename)
(setq ent (entget ent))
)
(cdr (assoc n ent))
)
 
(defun emod (ent i n)
(subst
(cons i n)
(assoc i ent)
ent
)
)
(defun c:pp (/)
(defun c:Num_TextForm_OnInitialize (/ w)
(if str (dcl_Control_SetText Num_TextForm_TextBox str))
)
(defun c:Num_TextForm_EnterButton_OnClicked (/ text)
(setq text (dcl_Control_GetText Num_TextForm_TextBox))
(if (/= text "")
(if en
(progn
(setq ent (emod (entget en) 1 text))
(entmod ent)
)
)
)
(dcl_Form_Close Num_TextForm)
)
(autoLoadODclArx)
(load_ODCL_Project numMain t nil nil)
(setq doContinue2 t doContinue3 t)
(while doContinue2
(setq doContinue2 nil)
(setq ss (entsel "Select the text:"))
(if ss
(progn
(setq
en (car ss)
ssType (dxf en 0)
)
(if (or (= ssType "TEXT") (= ssType "MTEXT"))
(progn
(setq
str (dxf en 1)
doContinue3 t
doContinue2 t
)
(while doContinue3
(setq doContinue3 nil)
(setq mPt (dcl_GetMouseCoords))
(dcl_Form_Show Num_TextForm (- (car mPt) 103) (- (cadr mPt) 17))
)
)
)
)
)
)
)
andy.
Best regards.

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: OpenDCL runtime Error
« Reply #1 on: March 18, 2015, 07:00:12 AM »
The problem is caused by the name of your project. It is 'Num2' not 'Num'. Try opening the original file in ODCL and using 'Save As' to change the name. You will probably also have to use 'Clear Lisp Symbol Names' and 'Reset Event Names' from the Tools menu.