This tutorial aims to guide for load a dll file with autolisp code
The file dll name, in this sample, is 'Mydll.dll' with class name 'class1'
(Register your dll file for lisp application)
In this case the dll file contains a sample function 'Public Function s_con(ByVal s_first As String, ByVal s_second As String )' (vb.net code)
The sample function 's_con' return a concatenation of first string variable and second string variable.
The autolisp code is:
Complete function :
(function my_dll(/ class acapp)
(setq S_f_string "conca"
S_f_string "tenate"
)
(vl-load-com)
(setq acapp (vlax-get-acad-object))
(setq class (vla-GetInterfaceObject acapp "Mydll.class1"))
(if (not class)
(princ "\nMyClass.dll loaded.\n")
(princ "\nError loading MyClass.dll.\n")
)
(setq out (vlax-invoke class 's_con S_f_string S_S_string))
out
)
for more info or send yours specific request contact_us to info@cadoptimize