Vlax-create-object examples

Vlax-create-object examples

jtoverka
Advocate Advocate
2,862 Views
5 Replies
Message 1 of 6

Vlax-create-object examples

jtoverka
Advocate
Advocate

I have already read the help file - vlax-create-object web help

 

I know you can do the following:

 

 

"WScript.Network"

"Scripting.FilesystemObject"

"WbemScripting.SWbemLocator"

"Excel.Application"

"Access.Application"

"Visio.Application"

"Word.Application"

 

I would like the complete list of objects I can interface with. I understand that any microsoft application can be interfaced with. This has been extremely helpful. How do I find more?

 

Accepted solutions (1)
2,863 Views
5 Replies
Replies (5)
Message 2 of 6

dlanorh
Advisor
Advisor

Set a variable name to the created object.

This creates a vbscript regex object

 

(setq regex (vlax-create-object "VBScript.RegExp"))

Then use the vlax- dump-object

 

      (vlax-dump-object regex T);; The T (true) tells it to list the objects properties and applicable methods
      (vlax-release-object regex);; when finished release the object

 

You can do all this from the command line. Output from the dump-object method goes to the text screen.

I am not one of the robots you're looking for

0 Likes
Message 3 of 6

ronjonp
Advisor
Advisor
Accepted solution

Maybe THIS will help you find program ID's.

0 Likes
Message 4 of 6

jtoverka
Advocate
Advocate

 

A user named MP posted here on December 12, 2016, 12:16:42 PM

 

(defun _FindProjIDs ( pattern )
    (   (lambda ( pfx sfx pattern )
            (vl-sort
                (vl-remove-if-not
                    (function
                        (lambda (x)
                            (and
                                (eq 'str (type x))
                                (wcmatch (strcase x) pattern)
                            )
                        )
                    )
                    (mapcar
                        (function 
                            (lambda (x) 
                                (vl-registry-read (strcat pfx x sfx))
                            )
                        )
                        (vl-registry-descendents pfx)
                    )
                )
               '<
            )       
        )
        "HKEY_CLASSES_ROOT\\CLSID\\"
        "\\ProgID"
        (strcase pattern)
    )
)

e.g.

(_FindProjIDs "*objectdbx*") ;; I don't have 3D max

>>

(
    "ObjectDBX.AxDbDocument.17"
    "ObjectDBX.AxDbDocument.18"
    "ObjectDBX.AxDbDocument.19"
    "ObjectDBX.AxDbDocument.20"
)

 

 

------------------------------------------------------------------------------

It appears that this information is stored within the registry and that this AutoLISP routine finds this information. Thank you very much for pointing me in the right direction.

 

 

0 Likes
Message 5 of 6

ronjonp
Advisor
Advisor

Glad to help 🙂 .. btw 'MP' is Michael Puckett .. he's a hella smart dude!

Message 6 of 6

Anonymous
Not applicable

please, help me

how to link tekla and visual lisp

(vlax-creat-object Tekla.Structures) -> nil

(vlax-creat-object Tekla.Structures.dll) -> nil

_netload file_path(dll file path)  ->error

 

> v.b code

reference Tekla.Structures.dll (add)

using tekla.structures;

 

how th link tekla ~~!!!1

help me please

0 Likes