Author Topic: Interogate an object for its ActiveX properties and methods ...  (Read 34294 times)

0 Members and 1 Guest are viewing this topic.

chlh_jd

  • Guest
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #75 on: October 14, 2014, 08:13:45 AM »
Thanks MP for share it .
I used it in Win7 64Bit , Acad2011  , I can't found tlbinf32.dll  . how to do it ?
« Last Edit: October 14, 2014, 08:40:13 AM by chlh_jd »

chlh_jd

  • Guest
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #76 on: October 14, 2014, 09:54:55 AM »
After I download the "tlbinf32.dll" , it can be register OK , and found CLSID {8B21775D-717D-11CE-AB5B-D41203C10000} , it's value is "_TLIApplication" .
However can't be read by
Code: [Select]
(vl-registry-read
  (strcat
    "HKEY_CLASSES_ROOT\\"
    "TLI.TLIApplication\\"
    "CLSID"
    )
)

can be read by following code, and return "_TLIApplication"  , but can't creat-object by "(vlax-create-object "_TLIApplication")" or "(vlax-create-object "TLI.TLIApplication")" 
Code: [Select]
(vl-some '(lambda (x)
(vl-registry-read
  x)) ;_"Wow6432Node\\"
     (list
       (strcat
"HKEY_CLASSES_ROOT\\"
"TLI.TLIApplication\\"
"CLSID"
)
       "HKEY_CLASSES_ROOT\\Interface\\{8B21775D-717D-11CE-AB5B-D41203C10000}"
       )
     )
« Last Edit: October 14, 2014, 10:49:28 AM by chlh_jd »

chlh_jd

  • Guest
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #77 on: October 16, 2014, 07:13:50 AM »
After , execute cmd.exe by adminstractor , it can be register , and found TLI.TLIApplication CLSID , but can't be created in VLIDE yet .
I don't install VBA for ACAD2011 ,  is it the reason ?
And I has installed VBA for ACAD2015 , it can't be created too .
I found a simlar dll  --- VSTLBINF.DLL in OFFICE12 ,  are  they the same TLIApplication ?
Many thanks .
« Last Edit: October 16, 2014, 07:17:39 AM by chlh_jd »

chlh_jd

  • Guest
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #78 on: October 20, 2014, 12:08:23 PM »
I execute the cmd.exe as Administrator , and then register VSTLBF.DLL , it can be right  import and use in OFFICE12 , but no OK in VLIDE .

Rod

  • Newt
  • Posts: 185
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #79 on: November 07, 2014, 06:05:54 AM »
Hi MP any chance of sharing _GetPropertiesAndMethods.
Looks like a really useful tool.

Thanks Rod
"All models are wrong, some models are useful" - George Box

Rod

  • Newt
  • Posts: 185
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #80 on: November 08, 2014, 06:42:39 AM »
Found more info at Topic "TLBINF32.DLL Upskirt" http://www.theswamp.org/index.php?topic=20003.0;all

But couldn't access through  (vlax-create-object "_TLIApplication") same as chlh_jd
I have been able to access through vlax-import-type-library but will have to investigate more when I get a chance.

Am I missing something couldn't actually find MPs code?
"All models are wrong, some models are useful" - George Box

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #81 on: November 08, 2014, 10:07:49 AM »
Hi Rod / all, sorry to report that tho I exploited the type lib thing for many years I abandoned utilities based on it due to licensing issues, unpredictable presence on computers and other annoyances.

I re-coded the whole thing using strictly lisp and dcl (which is what I had initially done many years ago, but was side tracked by the fact type lib would do 90% of the heavy lifting. A nod here to SomeCallMeDave who I believe was the first to suggest the use of tlbinf32 and sparked my interest in same).

I'm not ready to make it available publicly yet but I've been using my latest incarnation (reasonably stable) for about a year:



For the curious, It basically harvests the atoms family (which is augmented via vlax-import-type-library so it's populated with MS Access, Pro Structures ... info) and then sledge hammer interrogates an object via vlax-property-available-p and vlax-method-applicable-p. Despite having to slog thru candidate properties and methods numbering ~ 1000 and 800 respectively it's quick.

An aside, collections, objects, handles, entity names, xdata handles, e.g. (1005 ". "2A"), etc. are all live, allowing me to click thru the object model labyrinth at will. Between the live links and the [Pick], [PickN] and [Handle] methods, and the command line which lets me pass enames, objects and handles there's little that can escape it's examination.

Sorry it's not ready for prime time now. I have been simply swamped at my latest job, little time for extra curricular tools like this and others in the cue.

For the impatient there's enough info above to code your own or if you prefer, to use the venerable arxdbg utility (google).

Cheers.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #82 on: November 08, 2014, 11:25:47 AM »
Looks cool Michael  8)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #83 on: November 08, 2014, 11:29:29 AM »
Impressive work as always Michael.
The ® for read-only is a nice touch  :wink:

Rod

  • Newt
  • Posts: 185
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #84 on: November 09, 2014, 03:10:00 AM »
Ok no worries Michael.

Looks like a very impressive tool.
Especially useful for quick "I wonder if I could..." investigations with other software or type libraries.

I won't be writing my own code just yet but I appreciate the insight into how you went about it.
For now I will just use vlax-import-type-library and atoms-family
"All models are wrong, some models are useful" - George Box

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #85 on: November 11, 2014, 06:43:47 PM »
Thanks for your positive comments guys, encouraging. :)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst