Jump to content

Recommended Posts

Posted

I have a dll (mytest.dll) with a commandmethod ("cmdtest")

I want use lisp load and run.

The following code has a problem .

 

if "mytest.dll" is exist, run this code ,

but still prompt "mytest.dll not loaded!"

 

if if "mytest.dll" is not exist, run this code ,

prompt "TextToGeom.dll not find!"\nTextToGeom.dll not find!" ??? Repeated prompt :(

 

 

(defun c:test ()
(if (member "mytest.DLL" (mapcar 'strcase (arx)))
 (command "cmdtest")
 (if (findfile "mytest.dll")
   (progn
     (princ "\nmytest.dll not loaded!")
     (setvar "cmdecho" 0)
     (command "netload" (findfile "mytest.dll"))
     (princ "\nOk, ")
     (princ (findfile "mytest.dll"))
     (princ " loaded!")
     (command "cmdtest")
   )
   (princ "\nmytest.dll not find!")
 )
)
)

Posted

Regardless if the rest of the routine works or not , but this part that related to member function should be like this .

 

(member "MYTEST.DLL" (mapcar 'strcase (arx)))

Posted
Regardless if the rest of the routine works or not , but this part that related to member function should be like this .

 

(member "MYTEST.DLL" (mapcar 'strcase (arx)))

 

Thanks, Master Tharwat, Now is ok!

add (princ) at end.

Posted
Thanks, Master Tharwat, Now is ok!

 

Excellent , Happy to hear that :)

 

add (princ) at end.

 

That's needed to exit calmly ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...