Load an dll class library with autolisp

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:

Load dll with autolisp code

Complete function :

(function my_dll(/ class acapp)
    (setq S_f_string "conca"
    S_f_string "tenate"
    (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))

for more info or send yours specific request contact_us to info@cadoptimize

Web Design
Contact us

Linear interpolation 64x >    Longitudinal profile >    Map making >     Lisp Surface elevation 64x >   

lisp applications

Free lisp update block attribute >    Free lisp link photo from block >    Free lisp polyline to points >    NEW Free lisp circle selection >   

lisp cad video youtubecad linkedin

Application Lisp Applicazioni Lisp lisp applikationer Lisp-Anwendungen 口齒不清的應用             Valid HTML 4.01 Transitional