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

0 Members and 1 Guest are viewing this topic.

mkweaver

  • Bull Frog
  • Posts: 344
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #15 on: November 10, 2007, 11:51:38 AM »
...Snip

Also, if I can confirm tlbinf32.dll is a fully distributable file by Microsoft would you folks that don't have it be ok with a program creating it and registering it? Or would you prefer a link to it so you can install it and register it? I'm leaning towards the latter myself.

Thanks for your participation folks.

:)

Edit: Added Daniel, and it looks like the Visual Studio 6 guess thing might be a reasonable guess.

I would prefer a link to install and register.
You've got to love the swamp!

SomeCallMeDave

  • Guest
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #16 on: November 10, 2007, 12:50:45 PM »
For anyone just joining this thread, the questions --

1. What version of Windows?  XP Home SP 2
2. What version of AutoCAD? 2004-2007, LDD 2005, C3D 2008
3. Have you ever run the VBAIDE? yes
4. If found, what path on your machine hosts tlbinf32.dll? c:\windows\system32
5. Do you have Visual Studio 6 installed on an active drive?  VB6, VS 2005 + some of the Express IDE's


MP

  • Seagull
  • Posts: 17450
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #17 on: November 10, 2007, 01:55:37 PM »
I would prefer a link to install and register.

Mike, I've spent over an hour scanning MS's (no tlbinf32.dll download available) site and another 1/2 hour + googleling like crazy. Though I can find lots of sites that offer the dll none that I feel 100% recommending.  :?

You've got to love the swamp!

Indeed!  :lol:
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

MP

  • Seagull
  • Posts: 17450
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #18 on: November 10, 2007, 01:57:44 PM »
For anyone just joining this thread, the questions --

1. What version of Windows?  XP Home SP 2
2. What version of AutoCAD? 2004-2007, LDD 2005, C3D 2008
3. Have you ever run the VBAIDE? yes
4. If found, what path on your machine hosts tlbinf32.dll? c:\windows\system32
5. Do you have Visual Studio 6 installed on an active drive?  VB6, VS 2005 + some of the Express IDE's

Thanks Dave. Pretty much seals it for me -- those that have the dll can attribute it to a VS/VB6 install or a VB authored program that references said dll and includes it in a setup.
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

VovKa

  • Swamp Rat
  • Posts: 1153
  • Ukraine
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #19 on: November 10, 2007, 02:44:17 PM »
i have a distribution package of Visual Basic 6.0, TLBINF32.DLL is there. i copied it and registered.
and i got Found CLSID: {8B21775E-717D-11CE-AB5B-D41203C10000}

MP

  • Seagull
  • Posts: 17450
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #20 on: November 10, 2007, 03:41:21 PM »
Thanks VovKa. Hope to be able to share some decent code by weekend's end.

:)
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

MP

  • Seagull
  • Posts: 17450
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #21 on: November 10, 2007, 04:55:01 PM »
Well .... interrogation via TLBINF32.DLL doesn't appear to be missing anything:

Selecting a simple line object:

Properties:

    TLBINF32.DLL Interrogation                               VLAX-DUMP-OBJECT

    ("Angle" 0.430894)                                       Angle (RO) = 0.430894
    ("Application" #<VLA-OBJECT IAcadApplication 00d73d3c>)  Application (RO) = #<VLA-OBJECT IAcadApplication 00d73d3c>
    ("Color" 256)                                            -
    ("Database" #<VLA-OBJECT IAcadDatabase 0bc4ffd4>)        -
    ("Delta" (1155.15 531.026 0.0))                          Delta (RO) = (1155.15 531.026 0.0)
    ("Document" #<VLA-OBJECT IAcadDocument 01c35fc8>)        Document (RO) = #<VLA-OBJECT IAcadDocument 01c35fc8>
    ("EndPoint" (2069.81 1103.29 0.0))                       EndPoint = (2069.81 1103.29 0.0)
    ("EntityName" "AcDbLine")                                -
    ("EntityType" 19)                                        -
    ("Handle" "1AD")                                         Handle (RO) = "1AD"
    ("HasExtensionDictionary" 0)                             HasExtensionDictionary (RO) = 0
    ("Hyperlinks" #<VLA-OBJECT IAcadHyperlinks 0bc8398c>)    Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 0bc8486c>
    ("Layer" "0")                                            Layer = "0"
    ("Length" 1271.36)                                       Length (RO) = 1271.36
    ("Linetype" "ByLayer")                                   Linetype = "ByLayer"
    ("LinetypeScale" 1.0)                                    LinetypeScale = 1.0
    ("Lineweight" -1)                                        Lineweight = -1
    ("Material" "ByLayer")                                   Material = "ByLayer"
    ("Normal" (0.0 0.0 1.0))                                 Normal = (0.0 0.0 1.0)
    ("ObjectID" 2130322280)                                  ObjectID (RO) = 2130322280
    ("ObjectName" "AcDbLine")                                ObjectName (RO) = "AcDbLine"
    ("OwnerID" 2130316536)                                   OwnerID (RO) = 2130316536
    ("PlotStyleName" "ByLayer")                              PlotStyleName = "ByLayer"
    ("StartPoint" (914.661 572.261 0.0))                     StartPoint = (914.661 572.261 0.0)
    ("Thickness" 0.0)                                        Thickness = 0.0
    ("TrueColor" #<VLA-OBJECT IAcadAcCmColor 0bc61de0>)      TrueColor = #<VLA-OBJECT IAcadAcCmColor 0bc61e40>
    ("Visible" -1)                                           Visible = -1

Methods:

    TLBINF32.DLL Interrogation                               VLAX-DUMP-OBJECT

    ("AddRef" 0)                                             -
    ("ArrayPolar" 3)                                         ArrayPolar (3)
    ("ArrayRectangular" 6)                                   ArrayRectangular (6)
    ("Copy" 0)                                               Copy ()
    ("Delete" 0)                                             Delete ()
    ("Erase" 0)                                              -
    ("GetBoundingBox" 2)                                     GetBoundingBox (2)
    ("GetExtensionDictionary" 0)                             GetExtensionDictionary ()
    ("GetIDsOfNames" 5)                                      -
    ("GetTypeInfo" 3)                                        -
    ("GetTypeInfoCount" 1)                                   -
    ("GetXData" 3)                                           GetXData (3)
    ("Highlight" 1)                                          Highlight (1)
    ("IntersectWith" 2)                                      IntersectWith (2)
    ("Invoke" 8)                                             -
    ("Mirror" 2)                                             Mirror (2)
    ("Mirror3D" 3)                                           Mirror3D (3)
    ("Move" 2)                                               Move (2)
    ("Offset" 1)                                             Offset (1)
    ("QueryInterface" 2)                                     -
    ("Release" 0)                                            -
    ("Rotate" 2)                                             Rotate (2)
    ("Rotate3D" 3)                                           Rotate3D (3)
    ("ScaleEntity" 2)                                        ScaleEntity (2)
    ("SetXData" 2)                                           SetXData (2)
    ("TransformBy" 1)                                        TransformBy (1)
    ("Update" 0)                                             Update ()


Couple things surprised me, like what's up with color?

Next up: Flag hidden properties / methods.

:)
« Last Edit: November 10, 2007, 06:20:09 PM by MP »
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

Sdoman

  • Guest
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #22 on: November 10, 2007, 05:35:06 PM »
For anyone just joining this thread, the questions --

1. What version of Windows? Windows XP
2. What version of AutoCAD? 2007 sp1 (vanilla)
3. Have you ever run the VBAIDE? Yes, every day. Well almost every day : )
4. If found, what path on your machine hosts tlbinf32.dll? Not found.  However, Windows sometimes fails to find files I know are on my system.
5. Do you have Visual Studio 6 installed on an active drive? I have Visual C++ 2005 Express Edition

:)

PS: Thanks to latest folks: CAB, Daniel and Steve.

You're welcome. 

T.Willey

  • Needs a day job
  • Posts: 5218
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #23 on: November 10, 2007, 06:06:13 PM »
I'm willing to test when I get to work.  Here is a pic showing how hard it is to read the blue text on a dark background.   :wink:
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17450
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #24 on: November 10, 2007, 06:20:37 PM »
I'm willing to test when I get to work.  Here is a pic showing how hard it is to read the blue text on a dark background.   :wink:

Sounds great Tim. PS, changed the color just for you.
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

MP

  • Seagull
  • Posts: 17450
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #25 on: November 10, 2007, 06:27:38 PM »
Next up: Flag hidden properties / methods.

Done.

PROPERTIES

    ("Angle" 0.430894)
    ("Application" #<VLA-OBJECT IAcadApplication 00d73d3c>)
    ("Color" 256 HIDDEN)
    ("Database" #<VLA-OBJECT IAcadDatabase 0bc4ffd4> HIDDEN)
    ("Delta" (1155.15 531.026 0.0))
    ("Document" #<VLA-OBJECT IAcadDocument 01c35fc8>)
    ("EndPoint" (2069.81 1103.29 0.0))
    ("EntityName" "AcDbLine" HIDDEN)
    ("EntityType" 19 HIDDEN)

    ("Handle" "1AD")
    ("HasExtensionDictionary" 0)
    ("Hyperlinks" #<VLA-OBJECT IAcadHyperlinks 0bc83b4c>)
    ("Layer" "0")
    ("Length" 1271.36)
    ("Linetype" "ByLayer")
    ("LinetypeScale" 1.0)
    ("Lineweight" -1)
    ("Material" "ByLayer")
    ("Normal" (0.0 0.0 1.0))
    ("ObjectID" 2130322280)
    ("ObjectName" "AcDbLine")
    ("OwnerID" 2130316536)
    ("PlotStyleName" "ByLayer")
    ("StartPoint" (914.661 572.261 0.0))
    ("Thickness" 0.0)
    ("TrueColor" #<VLA-OBJECT IAcadAcCmColor 0bc624a0>)
    ("Visible" -1)

METHODS

    ("AddRef" 0)
    ("ArrayPolar" 3)
    ("ArrayRectangular" 6)
    ("Copy" 0)
    ("Delete" 0)
    ("Erase" 0 HIDDEN)
    ("GetBoundingBox" 2)
    ("GetExtensionDictionary" 0)
    ("GetIDsOfNames" 5)
    ("GetTypeInfo" 3)
    ("GetTypeInfoCount" 1)
    ("GetXData" 3)
    ("Highlight" 1)
    ("IntersectWith" 2)
    ("Invoke" 8)
    ("Mirror" 2)
    ("Mirror3D" 3)
    ("Move" 2)
    ("Offset" 1)
    ("QueryInterface" 2)
    ("Release" 0)
    ("Rotate" 2)
    ("Rotate3D" 3)
    ("ScaleEntity" 2)
    ("SetXData" 2)
    ("TransformBy" 1)
    ("Update" 0)
   
   
Now what ... hmmm ... oh yeah, argument names / types / optional flags :)
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

T.Willey

  • Needs a day job
  • Posts: 5218
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #26 on: November 10, 2007, 06:35:30 PM »
'Color' property might not show up when you use 'dump' on the object, but you can use it.  I have used it plenty of times instead of going through the 'TrueColor' object.

I'm willing to test when I get to work.  Here is a pic showing how hard it is to read the blue text on a dark background.   :wink:

Sounds great Tim. PS, changed the color just for you.
I just highlight the post so I can see it, but I just thought I would point it out since you did on my post.  :mrgreen:
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17450
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #27 on: November 10, 2007, 06:41:13 PM »
'Color' property might not show up when you use 'dump' on the object, but you can use it.  I have used it plenty of times instead of going through the 'TrueColor' object.

Hidden doesn't mean you can't use it (as you've noted) -- I've used hidden members for years in Visual BASIC (when in the Object Browser right click and select "Show hidden members"; ipso facto). However, one should be mindful that hidden means it shouldn't be used blithely, there may be valid reasons members are hidden including, but not limited to planned obsolescence.

I just highlight the post so I can see it, but I just thought I would point it out since you did on my post.

Ha! Got me, I forgot (the ol' sponge doesn't hold as much as it once did)!

:)
« Last Edit: November 10, 2007, 06:42:25 PM by MP »
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

MP

  • Seagull
  • Posts: 17450
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #28 on: November 10, 2007, 07:49:51 PM »
Ha, arguments list is now licked. Also determined if a property is read-only.

PROPERTIES   
   
    ("Angle" 0.430894 READONLY)
    ("Application" #<VLA-OBJECT IAcadApplication 00d73d3c> READONLY)
    ("Color" 256 HIDDEN)
    ("Database" #<VLA-OBJECT IAcadDatabase 0bc4ffd4> READONLY HIDDEN)
    ("Delta" (1155.15 531.026 0.0) READONLY)
    ("Document" #<VLA-OBJECT IAcadDocument 01c35fc8> READONLY)
    ("EndPoint" (2069.81 1103.29 0.0))
    ("EntityName" "AcDbLine" READONLY HIDDEN)
    ("EntityType" 19 READONLY HIDDEN)
    ("Handle" "1AD" READONLY)
    ("HasExtensionDictionary" 0 READONLY)
    ("Hyperlinks" #<VLA-OBJECT IAcadHyperlinks 0bc83bbc> READONLY)
    ("Layer" "0")
    ("Length" 1271.36 READONLY)
    ("Linetype" "ByLayer")
    ("LinetypeScale" 1.0)
    ("Lineweight" -1)
    ("Material" "ByLayer")
    ("Normal" (0.0 0.0 1.0))
    ("ObjectID" 2130322280 READONLY)
    ("ObjectName" "AcDbLine" READONLY)
    ("OwnerID" 2130316536 READONLY)
    ("PlotStyleName" "ByLayer")
    ("StartPoint" (914.661 572.261 0.0))
    ("Thickness" 0.0)
    ("TrueColor" #<VLA-OBJECT IAcadAcCmColor 0bc624a0>)
    ("Visible" -1)
   
METHODS   
   
    ("AddRef" 0)
    ("ArrayPolar" 3 ("NumberOfObjects" "AngleToFill" "CenterPoint"))
    ("ArrayRectangular" 6 ("NumberOfRows" "NumberOfColumns" "NumberOfLevels" "DistBetweenRows" "DistBetweenCols" "DistBetweenLevels"))
    ("Copy" 0)
    ("Delete" 0)
    ("Erase" 0 HIDDEN)
    ("GetBoundingBox" 2 ("MinPoint" "MaxPoint"))
    ("GetExtensionDictionary" 0)
    ("GetIDsOfNames" 5 ("riid" "rgszNames" "cNames" "lcid" "rgdispid"))
    ("GetTypeInfo" 3 ("itinfo" "lcid" "pptinfo"))
    ("GetTypeInfoCount" 1 ("pctinfo"))
    ("GetXData" 3 ("AppName" "XDataType" "XDataValue"))
    ("Highlight" 1 ("HighlightFlag"))
    ("IntersectWith" 2 ("IntersectObject" "option"))
    ("Invoke" 8 ("dispidMember" "riid" "lcid" "wFlags" "pdispparams" "pvarResult" "pexcepinfo" "puArgErr"))
    ("Mirror" 2 ("Point1" "Point2"))
    ("Mirror3D" 3 ("Point1" "Point2" "point3"))
    ("Move" 2 ("FromPoint" "ToPoint"))
    ("Offset" 1 ("Distance"))
    ("QueryInterface" 2 ("riid" "ppvObj"))
    ("Release" 0)
    ("Rotate" 2 ("BasePoint" "RotationAngle"))
    ("Rotate3D" 3 ("Point1" "Point2" "RotationAngle"))
    ("ScaleEntity" 2 ("BasePoint" "ScaleFactor"))
    ("SetXData" 2 ("XDataType" "XDataValue"))
    ("TransformBy" 1 ("TransformationMatrix"))
    ("Update" 0)


Hmmm, now what ...  :lol:
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

MP

  • Seagull
  • Posts: 17450
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #29 on: November 10, 2007, 07:57:56 PM »
Hmmm, now what ...

Argument types and flags (like optional).

Yes, I'm talking to myself.

:P
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox