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

0 Members and 1 Guest are viewing this topic.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #30 on: November 10, 2007, 08:35:47 PM »
Added argument types:

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 0bc83fe4> 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 0bc63190>)
    ("Visible" -1)

METHODS

    ("AddRef" 0)
    ("ArrayPolar" 3 (("NumberOfObjects" INT) ("AngleToFill" R8) ("CenterPoint" variant)))
    ("ArrayRectangular" 6 (("NumberOfRows" INT) ("NumberOfColumns" INT) ("NumberOfLevels" INT) ("DistBetweenRows" R8) ("DistBetweenCols" R8) ("DistBetweenLevels" R8)))
    ("Copy" 0)
    ("Delete" 0)
    ("Erase" 0 HIDDEN)
    ("GetBoundingBox" 2 (("MinPoint" variant) ("MaxPoint" variant)))
    ("GetExtensionDictionary" 0)
    ("GetIDsOfNames" 5 (("riid" EMPTY) ("rgszNames" I1) ("cNames" UINT) ("lcid" UI4) ("rgdispid" I4)))
    ("GetTypeInfo" 3 (("itinfo" UINT) ("lcid" UI4) ("pptinfo" VOID)))
    ("GetTypeInfoCount" 1 (("pctinfo" UINT)))
    ("GetXData" 3 (("AppName" BSTR) ("XDataType" variant) ("XDataValue" variant)))
    ("Highlight" 1 (("HighlightFlag" BOOL)))
    ("IntersectWith" 2 (("IntersectObject" DISPATCH) ("option" EMPTY)))
    ("Invoke" 8 (("dispidMember" I4) ("riid" EMPTY) ("lcid" UI4) ("wFlags" UI2) ("pdispparams" EMPTY) ("pvarResult" variant) ("pexcepinfo" EMPTY) ("puArgErr" UINT)))
    ("Mirror" 2 (("Point1" variant) ("Point2" variant)))
    ("Mirror3D" 3 (("Point1" variant) ("Point2" variant) ("point3" variant)))
    ("Move" 2 (("FromPoint" variant) ("ToPoint" variant)))
    ("Offset" 1 (("Distance" R8)))
    ("QueryInterface" 2 (("riid" EMPTY) ("ppvObj" VOID)))
    ("Release" 0)
    ("Rotate" 2 (("BasePoint" variant) ("RotationAngle" R8)))
    ("Rotate3D" 3 (("Point1" variant) ("Point2" variant) ("RotationAngle" R8)))
    ("ScaleEntity" 2 (("BasePoint" variant) ("ScaleFactor" R8)))
    ("SetXData" 2 (("XDataType" variant) ("XDataValue" variant)))
    ("TransformBy" 1 (("TransformationMatrix" variant)))
    ("Update" 0)


On to the optional flag ... :lol:
« Last Edit: November 10, 2007, 10:22:28 PM by MP »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #31 on: November 10, 2007, 09:07:08 PM »

By any chance had you planned on throwing these into an OpenDCL Grid :-)

the potential looks pretty spiffy Michael !
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #32 on: November 10, 2007, 09:10:31 PM »

By any chance had you planned on throwing these into an OpenDCL Grid :-)

the potential looks pretty spiffy Michael !

Ye bastid, had to give away the surprise dincha?

 :pissed:

(Listview is more appropriate me thinks).

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

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #33 on: November 10, 2007, 09:23:13 PM »

By any chance had you planned on throwing these into an OpenDCL Grid :-)

the potential looks pretty spiffy Michael !

Ye bastid, had to give away the surprise dincha?

 :pissed:

(Listview is more appropriate me thinks).



Oooops ...   :oops:

yep, Listview may be better ..
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #34 on: November 10, 2007, 09:24:45 PM »
Oooops ...   :oops:

Ha, no worries, I mean it would be the logical conclusion given me history no?

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

Glenn R

  • Guest
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #35 on: November 11, 2007, 12:12:58 AM »
Code: [Select]
Command: tlitest
Better write a better _FindDLL MP!

Windows XP SP2 with all the latest bloatware.
Visual Studio 2005 - did have Vis Studio 2003 and Visual Studio .NET and Visual Studio 6 on here but removed.
AutoCAD's 2006, 2007 and 2008
Run VBA in all of them...I think that's all you need.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #36 on: November 12, 2007, 11:14:31 AM »
Code: [Select]
Command: tlitest
Better write a better _FindDLL MP!

Windows XP SP2 with all the latest bloatware.
Visual Studio 2005 - did have Vis Studio 2003 and Visual Studio .NET and Visual Studio 6 on here but removed.
AutoCAD's 2006, 2007 and 2008
Run VBA in all of them...I think that's all you need.

Thanks Glenn. That latter tidbit would sure be nice, but no way I can test -- all my pcs, including work, have VB6 Enterprise installed.

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

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #37 on: November 12, 2007, 11:19:31 AM »
Update, licked the optional flag --

PROPERTIES

    (NAME VALUE VISIBILITY ACCESS)

    ("Active" -1 VISIBLE READONLY)
    ("ActiveDimStyle" #<VLA-OBJECT IAcadDimStyle 0bc56194> VISIBLE READONLY)
    ("ActiveLayer" #<VLA-OBJECT IAcadLayer 0bc560f4> VISIBLE READONLY)
    ("ActiveLayout" #<VLA-OBJECT IAcadLayout 0bc55b54> VISIBLE READONLY)
    ("ActiveLinetype" #<VLA-OBJECT IAcadLineType 0bc56004> VISIBLE READONLY)
    ("ActiveMaterial" #<VLA-OBJECT IAcadMaterial 0bc55e74> VISIBLE READONLY)
    ("ActivePViewport" #<VLA-OBJECT IAcadPViewport2 0bc75ae4> VISIBLE READONLY)
    ("ActiveSelectionSet" #<VLA-OBJECT IAcadSelectionSet 0be2d6ac> VISIBLE READONLY)
    ("ActiveSpace" 0 VISIBLE READONLY)
    ("ActiveTextStyle" #<VLA-OBJECT IAcadTextStyle 0bc56054> VISIBLE READONLY)
    ("ActiveUCS" "<Error: AutoCAD: Null object ID>" VISIBLE READONLY)
    ("ActiveViewport" "<Error: AutoCAD: No active viewport in paperspace>" VISIBLE READONLY)
    ("Application" #<VLA-OBJECT IAcadApplication 00d73d3c> VISIBLE READONLY)
    ("Blocks" #<VLA-OBJECT IAcadBlocks 0bc559c4> VISIBLE READONLY)
    ("Database" #<VLA-OBJECT IAcadDatabase 0bc4ffd4> VISIBLE READONLY)
    ("Dictionaries" #<VLA-OBJECT IAcadDictionaries 0bc55ba4> VISIBLE READONLY)
    ("DimStyles" #<VLA-OBJECT IAcadDimStyles 0bc55c94> VISIBLE READONLY)
    ("ElevationModelSpace" 0.0 VISIBLE READONLY)
    ("ElevationPaperSpace" 0.0 VISIBLE READONLY)
    ("FileDependencies" #<VLA-OBJECT IAcadFileDependencies 0bc4c59c> VISIBLE READONLY)
    ("FullName" "" VISIBLE READONLY)
    ("Groups" #<VLA-OBJECT IAcadGroups 0bc55fb4> VISIBLE READONLY)
    ("HWND" 1575628 VISIBLE READONLY)
    ("Height" 1041 VISIBLE READONLY)
    ("Layers" #<VLA-OBJECT IAcadLayers 0bc56234> VISIBLE READONLY)
    ("Layouts" #<VLA-OBJECT IAcadLayouts 0bc558d4> VISIBLE READONLY)
    ("Limits" (0.0 0.0 420.0 297.0) VISIBLE READONLY)
    ("Linetypes" #<VLA-OBJECT IAcadLineTypes 0bc55ab4> VISIBLE READONLY)
    ("MSpace" 0 VISIBLE READONLY)
    ("Materials" #<VLA-OBJECT IAcadMaterials 0bc56144> VISIBLE READONLY)
    ("ModelSpace" #<VLA-OBJECT IAcadModelSpace2 0bc55b04> VISIBLE READONLY)
    ("Name" "Drawing1.dwg" VISIBLE READONLY)
    ("ObjectSnapMode" 0 VISIBLE READONLY)
    ("PaperSpace" #<VLA-OBJECT IAcadPaperSpace2 0bc55dd4> VISIBLE READONLY)
    ("Path" "C:\\Users\\programmer\\Documents" VISIBLE READONLY)
    ("PickfirstSelectionSet" #<VLA-OBJECT IAcadSelectionSet 0be2e75c> VISIBLE READONLY)
    ("Plot" #<VLA-OBJECT IAcadPlot 10207e94> VISIBLE READONLY)
    ("PlotConfigurations" #<VLA-OBJECT IAcadPlotConfigurations 0bc55bf4> VISIBLE READONLY)
    ("Preferences" #<VLA-OBJECT IAcadDatabasePreferences 0bc4c524> VISIBLE READONLY)
    ("ReadOnly" 0 VISIBLE READONLY)
    ("RegisteredApplications" #<VLA-OBJECT IAcadRegisteredApplications 0bc55f14> VISIBLE READONLY)
    ("Saved" 0 VISIBLE READONLY)
    ("SectionManager" "<Error: Exception occurred>" VISIBLE READONLY)
    ("SelectionSets" #<VLA-OBJECT IAcadSelectionSets 01bb946c> VISIBLE READONLY)
    ("SummaryInfo" #<VLA-OBJECT IAcadSummaryInfo 0bc4c5c4> VISIBLE READONLY)
    ("TextStyles" #<VLA-OBJECT IAcadTextStyles 0bc55c44> VISIBLE READONLY)
    ("UserCoordinateSystems" #<VLA-OBJECT IAcadUCSs 0bc560a4> VISIBLE READONLY)
    ("Utility" #<VLA-OBJECT IAcadUtility 0be5828c> VISIBLE READONLY)
    ("Viewports" #<VLA-OBJECT IAcadViewports 0bc55ec4> VISIBLE READONLY)
    ("Views" #<VLA-OBJECT IAcadViews 0bc55d34> VISIBLE READONLY)
    ("Width" 1936 VISIBLE READONLY)
    ("WindowState" 3 VISIBLE READONLY)
    ("WindowTitle" "Drawing1.dwg" VISIBLE READONLY)

METHODS

    (NAME ARGUMENTS VISIBILITY)

    ("Activate" nil VISIBLE)
    ("AddRef" nil VISIBLE)
    ("AuditInfo" (("FixErr" BOOL)) VISIBLE)
    ("Close" (("SaveChanges" VARIANT OPTIONAL) ("FileName" VARIANT OPTIONAL)) VISIBLE)
    ("CopyObjects" (("Objects" VARIANT) ("Owner" VARIANT OPTIONAL) ("IdPairs" VARIANT OPTIONAL)) VISIBLE)
    ("EndUndoMark" nil VISIBLE)
    ("Export" (("FileName" STR) ("Extension" STR) ("SelectionSet" EMPTY)) VISIBLE)
    ("GetIDsOfNames" (("riid" EMPTY) ("rgszNames" I1) ("cNames" UINT) ("lcid" UI4) ("rgdispid" I4)) VISIBLE)
    ("GetTypeInfo" (("itinfo" UINT) ("lcid" UI4) ("pptinfo" VOID)) VISIBLE)
    ("GetTypeInfoCount" (("pctinfo" UINT)) VISIBLE)
    ("GetVariable" (("Name" STR)) VISIBLE)
    ("HandleToObject" (("Handle" STR)) VISIBLE)
    ("Import" (("FileName" STR) ("InsertionPoint" VARIANT) ("ScaleFactor" REAL)) VISIBLE)
    ("Invoke" (("dispidMember" I4) ("riid" EMPTY) ("lcid" UI4) ("wFlags" UI2) ("pdispparams" EMPTY) ("pvarResult" VARIANT) ("pexcepinfo" EMPTY) ("puArgErr" UINT)) VISIBLE)
    ("LoadShapeFile" (("FullName" STR)) VISIBLE)
    ("New" (("TemplateFileName" STR)) VISIBLE)
    ("ObjectIdToObject" (("ObjectID" I4)) VISIBLE)
    ("Open" (("FullName" STR) ("Password" VARIANT OPTIONAL)) VISIBLE)
    ("PurgeAll" nil VISIBLE)
    ("QueryInterface" (("riid" EMPTY) ("ppvObj" VOID)) VISIBLE)
    ("Regen" (("WhichViewports" EMPTY)) VISIBLE)
    ("Release" nil VISIBLE)
    ("Save" nil VISIBLE)
    ("SaveAs" (("FullFileName" STR) ("SaveAsType" VARIANT OPTIONAL) ("vSecurityParams" VARIANT OPTIONAL)) VISIBLE)
    ("SendCommand" (("Command" STR)) VISIBLE)
    ("SetVariable" (("Name" STR) ("Value" VARIANT)) VISIBLE)
    ("StartUndoMark" nil VISIBLE)
    ("Wblock" (("FileName" STR) ("SelectionSet" EMPTY)) VISIBLE)


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

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #38 on: November 12, 2007, 11:24:03 AM »
1. What version of Windows? - Xp Pro Sp2
2. What version of AutoCAD? - '06, '08 Electrical
3. Have you ever run the VBAIDE? - Maybe (but won't now)
4. What path on your machine hosts tlbinf32.dll? - N/A
5. Do you have Visual Studio 6 installed on an active drive? - Nope.

Quote from: Acad command line
Command: tlitest
Better write a better _FindDLL MP!
Tim

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

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #39 on: November 12, 2007, 11:25:07 AM »
Looks like you are enjoying this one Michael.  Good work.
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: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #40 on: November 12, 2007, 11:28:37 AM »
Thanks x 2 Tim!

It's been a real hoot, a great technical challenge and the basis of other pet projects I've had for years (object interrogation that is).

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

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #41 on: November 12, 2007, 11:51:53 AM »
Woo hoo, this one had been eluding me --

METHODS    

    (NAME ARGUMENTS VISIBILITY ACCESS)

    ("Activate" nil VISIBLE NORMAL)
    ("AddRef" nil VISIBLE RESTRICTED)
    ("AuditInfo" (("FixErr" BOOL)) VISIBLE NORMAL)
    ("Close" (("SaveChanges" variant OPTIONAL) ("FileName" variant OPTIONAL)) VISIBLE NORMAL)
    ("CopyObjects" (("Objects" variant) ("Owner" variant OPTIONAL) ("IdPairs" variant OPTIONAL)) VISIBLE NORMAL)
    ("EndUndoMark" nil VISIBLE NORMAL)
    ("Export" (("FileName" STR) ("Extension" STR) ("SelectionSet" EMPTY)) VISIBLE NORMAL)
    ("GetIDsOfNames" (("riid" EMPTY) ("rgszNames" I1) ("cNames" UINT) ("lcid" UI4) ("rgdispid" I4)) VISIBLE RESTRICTED)
    ("GetTypeInfo" (("itinfo" UINT) ("lcid" UI4) ("pptinfo" VOID)) VISIBLE RESTRICTED)
    ("GetTypeInfoCount" (("pctinfo" UINT)) VISIBLE RESTRICTED)
    ("GetVariable" (("Name" STR)) VISIBLE NORMAL)
    ("HandleToObject" (("Handle" STR)) VISIBLE NORMAL)
    ("Import" (("FileName" STR) ("InsertionPoint" variant) ("ScaleFactor" REAL)) VISIBLE NORMAL)
    ("Invoke" (("dispidMember" I4) ("riid" EMPTY) ("lcid" UI4) ("wFlags" UI2) ("pdispparams" EMPTY) ("pvarResult" variant) ("pexcepinfo" EMPTY) ("puArgErr" UINT)) VISIBLE RESTRICTED)
    ("LoadShapeFile" (("FullName" STR)) VISIBLE NORMAL)
    ("New" (("TemplateFileName" STR)) VISIBLE NORMAL)
    ("ObjectIdToObject" (("ObjectID" I4)) VISIBLE NORMAL)
    ("Open" (("FullName" STR) ("Password" variant OPTIONAL)) VISIBLE NORMAL)
    ("PurgeAll" nil VISIBLE NORMAL)
    ("QueryInterface" (("riid" EMPTY) ("ppvObj" VOID)) VISIBLE RESTRICTED)
    ("Regen" (("WhichViewports" EMPTY)) VISIBLE NORMAL)
    ("Release" nil VISIBLE RESTRICTED)
    ("Save" nil VISIBLE NORMAL)
    ("SaveAs" (("FullFileName" STR) ("SaveAsType" variant OPTIONAL) ("vSecurityParams" variant OPTIONAL)) VISIBLE NORMAL)
    ("SendCommand" (("Command" STR)) VISIBLE NORMAL)
    ("SetVariable" (("Name" STR) ("Value" variant)) VISIBLE NORMAL)
    ("StartUndoMark" nil VISIBLE NORMAL)
    ("Wblock" (("FileName" STR) ("SelectionSet" EMPTY)) VISIBLE NORMAL)




I think I may be close to being done the functional core.

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

Bob Wahr

  • Guest
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #42 on: November 12, 2007, 11:54:16 AM »
I pasted your code into my VBAIDE and it won't run.  Looks like complete and total crap to me.  What are all the curvy things?

Quote from: Command Line
C:TLITEST

Command: tlitest
Better write a better _FindDLL MP!

Command:

1. What version of Windows?
        Microsoft Windows
        Version 5.1 (Build 2600.xpsp_sp2_qfe.070227-2300 : Service Pack 2)
2. What version of AutoCAD?
        AutoCAD 2008
        B.51.0(UNICODE)
3. Have you ever run the VBAIDE?
        Yeppers
4. What path on your machine hosts tlbinf32.dll?
        Search is complete.  There are no results to display.
5. Do you have Visual Studio 6 installed on an active drive?
        No, haven't installed since the move.


Hmmm...guess I should read through the entire thread before posting.  You probably don't need the info, but just in case...

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #43 on: November 12, 2007, 11:57:44 AM »
Thank you Bob, it's good info.

It supports my supposition that machines that have had Visual BASIC 6 installed sport the dll, otherwise no.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

FengK

  • Guest
Re: Interogate an object for its ActiveX properties and methods ...
« Reply #44 on: November 12, 2007, 01:11:16 PM »
Command: TliTest Better write a better _FindDLL MP!

1. What version of Windows? 
Windows XP Pro

2. What version of AutoCAD?
AutoCAD 2007

3. Have you ever run the VBAIDE?
Yes

4. What path on your machine hosts tlbinf32.dll?
Searched in C drive. Not found.

5. Do you have Visual Studio 6 installed on an active drive?
No.