First I ran the code in debug mode. When it failed on that line, I checked
the registry for the class id.
--
Ed
--
"Andrew Elmore" wrote in message
news:E758975137C0C4C9CE34FF89F5B98D04@in.WebX.maYIadrTaRb...
> I bet that the .4 is the problem how did you know to add that?
>
> Andy
>
> "Ed Jobe" wrote in message
> news:131F55137073E8ADDFEDA37E3649D234@in.WebX.maYIadrTaRb...
> > I created a new standard.exe project with the sample code and got it to
> work
> > with the following changes. The help topic is still for ADT 3.3.
> > Set acadApp = GetObject(, "AutoCAD.Application.16") 'change 15 to
16
> > Set acadApp = CreateObject("AutoCAD.Application.16") 'change
15
> to
> > 16
> > Set adtApp =
> > acadApp.GetInterfaceObject("AecX.AecArchBaseApplication.4") 'add ".4"
> >
> > --
> > Ed
> > --
> >
> > "Andrew Elmore" wrote in message
> > news:CD06008A7213A0EE94F3BB866CB51CBB@in.WebX.maYIadrTaRb...
> > > I tried it VB6 as well...no luck
> > > can you do it in VB6 with what ever version of acad you have.
> > >
> > > Andy
> > >
> > > "Ed Jobe" wrote in message
> > > news:FB73B90B1AD07F4AECBC737C39A5AD85@in.WebX.maYIadrTaRb...
> > > > Then I think your problem must be with trying to utilize that code
in
> > > > vb.net. Since I don't have vb.net, I don't think I can be of much
more
> > > help.
> > > > Sorry.
> > > >
> > > > --
> > > > Ed
> > > > --
> > > >
> > > > "Andrew Elmore" wrote in message
> > > > news:0D00F4EC14162F1DECC2A3B003C8EEBB@in.WebX.maYIadrTaRb...
> > > > > I'm useing ADT 04 so that would be version 16, I still have 3.3
and
> > > tried
> > > > > that code in it and same result.
> > > > >
> > > > > Andy
> > > > >
> > > > > "Ed Jobe" wrote in message
> > > > > news:428A65E765DAEE61D4641E82F890FAC7@in.WebX.maYIadrTaRb...
> > > > > > I noticed that it used ver 15 for the class id. What version are
> you
> > > > > using?
> > > > > >
> > > > > > --
> > > > > > Ed
> > > > > > --
> > > > > >
> > > > > > "Andrew Elmore" wrote in message
> > > > > > news:C708573159058EABE4F5D7538E8FAF7A@in.WebX.maYIadrTaRb...
> > > > > > > That example does not work. I tried it!
> > > > > > >
> > > > > > > Andy
> > > > > > >
> > > > > > > "Ed Jobe" wrote in message
> > > > > > > news:BE1AC2EFFC9E09D1B1B27C2ED932882F@in.WebX.maYIadrTaRb...
> > > > > > > > Autodesk has already provided a listing. There is an example
> in
> > > the
> > > > > help
> > > > > > > > located at:
> > > > > > > > Architectural Desktop User's Guide>Architectural Desktop
> ActiveX
> > > > > > > > Reference>Understanding ActiveX Automation in ADT>Using
Visual
> > > Basic
> > > > > to
> > > > > > > > Program ADT>Converting VBA Code to VB>Revised VB Code
> > > > > > > >
> > > > > > > > HTH
> > > > > > > >
> > > > > > > > --
> > > > > > > > Ed
> > > > > > > > --
> > > > > > > >
> > > > > > > > "Andrew Elmore" wrote in message
> > > > > > > > news:C96C15FBC787C7C8CA91CF9D5CB99AA6@in.WebX.maYIadrTaRb...
> > > > > > > > > That works for VBA but not for VB so I need and example of
> > > setting
> > > > > the
> > > > > > > ADT
> > > > > > > > > var to get the ADT application class, then I guess I could
> set
> > > the
> > > > > > > ADTdoc
> > > > > > > > to
> > > > > > > > > get control of the ADT styles. I guess this is why they
> added
> > > the
> > > > > > > > > getintefaceobject, but with no help or listing of good
> > > getinteface
> > > > > > > > > calls...... Autodesk???????
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > "Ed Jobe" wrote in message
> > > > > > > > >
news:6607C316DC015CCD738633DE96766588@in.WebX.maYIadrTaRb...
> > > > > > > > > > When ADT starts, it takes care of loading all the aec
> stuff.
> > > > > > Therefore
> > > > > > > > all
> > > > > > > > > > you have to do is get/create an acad object to start an
> > > instance
> > > > > of
> > > > > > > > acad.
> > > > > > > > > > Dim your vars as aec specific object types and it should
> > work.
> > > > > > > provided
> > > > > > > > > you
> > > > > > > > > > referenced the librarie/s.
> > > > > > > > > >
> > > > > > > > > > With "AEC Architechtural 4.0 Application library"
> > referenced,
> > > > the
> > > > > > help
> > > > > > > > > topic
> > > > > > > > > > for AecBaseDocument gives this:
> > > > > > > > > > Dim doc As AecBaseDocument
> > > > > > > > > > Dim app As New AecBaseApplication
> > > > > > > > > >
> > > > > > > > > > app.Init ThisDrawing.Application
> > > > > > > > > > Set doc = app.ActiveDocument
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Ed
> > > > > > > > > > --
> > > > > > > > > >
> > > > > > > > > > "Andrew Elmore" wrote in message
> > > > > > > > > >
> news:2EA05607F46D5ACBEEA2210F56881737@in.WebX.maYIadrTaRb...
> > > > > > > > > > > I think I tried that but with no luck. I need to
connect
> > to
> > > > > ADTapp
> > > > > > > not
> > > > > > > > > > ACAD
> > > > > > > > > > > app.
> > > > > > > > > > > how cad I get to the adt side of ACAD is the problem
> > > > > > > > > > > so far i'm useing
> > > > > > > > > > > Acad_app = Getobject(,"AutoCAD.Application")
> > > > > > > > > > > Acad_doc = Acad_app.Activedocument............
> > > > > > > > > > >
> > > > > > > > > > > some how if I could do some thing like....
> > > > > > > > > > > ADT_app = Getobject(,"ADT.Application")
> > > > > > > > > > >
> > > > > > > > > > > here's my code in VB.net, I tried it VB6 also with no
> > > > > > luck(converted
> > > > > > > > to
> > > > > > > > > > vb6
> > > > > > > > > > > lang of course)
> > > > > > > > > > > all I want todo is get the style that are currently in
> the
> > > doc
> > > > > and
> > > > > > > > have
> > > > > > > > > > > access to adt specific stuff.
> > > > > > > > > > > Imports AutoCAD
> > > > > > > > > > >
> > > > > > > > > > > Imports AutoCAD_lib
> > > > > > > > > > >
> > > > > > > > > > > Imports AecXUIArchBase
> > > > > > > > > > >
> > > > > > > > > > > Imports AecXBase
> > > > > > > > > > >
> > > > > > > > > > > Imports AecXArchBase
> > > > > > > > > > >
> > > > > > > > > > > Imports AecXUIBase
> > > > > > > > > > >
> > > > > > > > > > > Imports AXDBLib
> > > > > > > > > > >
> > > > > > > > > > > Private Acad_Connecter As New AutoCADConnector_VB
> > > > > > > > > > >
> > > > > > > > > > > Public WithEvents Acad_app As AcadApplication =
> > > > > > > > > Acad_Connecter.Application
> > > > > > > > > > >
> > > > > > > > > > > Public WithEvents Acad_doc As AcadDocument =
> > > > > > Acad_app.ActiveDocument
> > > > > > > > > > >
> > > > > > > > > > > Private Sub Form1_Load(ByVal sender As System.Object,
> > ByVal
> > > e
> > > > As
> > > > > > > > > > > System.EventArgs) Handles MyBase.Load
> > > > > > > > > > >
> > > > > > > > > > > ListBox1.Items.Add(Acad_doc.Name)
> > > > > > > > > > >
> > > > > > > > > > > Dim strStyles() As String
> > > > > > > > > > >
> > > > > > > > > > > Dim bytX As Byte = 10
> > > > > > > > > > >
> > > > > > > > > > > Dim ADTapp As AecArchBaseApplication
> > > > > > > > > > >
> > > > > > > > > > > Dim ADTdoc As AecArchBaseDocument
> > > > > > > > > > >
> > > > > > > > > > > Try
> > > > > > > > > > >
> > > > > > > > > > > ADTdoc = Acad_app.ActiveDocument
> > > > > > > > > > >
> > > > > > > > > > > Catch ex As Exception
> > > > > > > > > > >
> > > > > > > > > > > MsgBox("Darn!")
> > > > > > > > > > >
> > > > > > > > > > > End Try
> > > > > > > > > > >
> > > > > > > > > > > End Sub
> > > > > > > > > > >
> > > > > > > > > > > "Ed Jobe" wrote in message
> > > > > > > > > > >
> > news:975B95983B8145A70A1C782826175742@in.WebX.maYIadrTaRb...
> > > > > > > > > > > > In that case, you are using the wrong approach. Just
> > > > reference
> > > > > > the
> > > > > > > > > > > > appropriate type library you need. There are several
> > that
> > > > > begin
> > > > > > > with
> > > > > > > > > > > "AEC".
> > > > > > > > > > > > Go to Tools>References.
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > Ed
> > > > > > > > > > > > --
> > > > > > > > > > > >
> > > > > > > > > > > > "Andrew Elmore" wrote in
message
> > > > > > > > > > > >
> > > news:5E14B45318859DD87258E81BA8D5DFDA@in.WebX.maYIadrTaRb...
> > > > > > > > > > > > > I'm trying to get the ADT interface so that I can
> > > > externally
> > > > > > get
> > > > > > > > the
> > > > > > > > > > > wall
> > > > > > > > > > > > > styles that are in that document and other ADT
> > specific
> > > > > items.
> > > > > > > So
> > > > > > > > I
> > > > > > > > > > want
> > > > > > > > > > > > to
> > > > > > > > > > > > > get ADTapp and ADTdoc/s. I think this is the last
> > major
> > > > > > problem
> > > > > > > > I'll
> > > > > > > > > > > > > encounter before I write all the code for my
program
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > > Andy Elmore
> > > > > > > > > > > > >
> > > > > > > > > > > > > "Ed Jobe" wrote in message
> > > > > > > > > > > > >
> > > > news:0C30E5C32ACC959FD4F44EA40A107E84@in.WebX.maYIadrTaRb...
> > > > > > > > > > > > > > Which interface are you trying to obtain?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --
> > > > > > > > > > > > > > Ed
> > > > > > > > > > > > > > --
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > "Andy Elmore" wrote in
> message
> > > > > > > > > > > > > >
> > > > > news:DEFEA0C19E3EB0AF0FE03EECC5B7A240@in.WebX.maYIadrTaRb...
> > > > > > > > > > > > > > > I'm trying to use the GetInterFaceObject with
no
> > > > success
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I've tried the example given in the help files
> but
> > > > that
> > > > > > > > example
> > > > > > > > > > does
> > > > > > > > > > > > not
> > > > > > > > > > > > > > > work either.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Does anyone have an example of useing this
> method
> > > with
> > > > > > > ADT04,
> > > > > > > > I
> > > > > > > > > > > guess
> > > > > > > > > > > > > the
> > > > > > > > > > > > > > > help file with this example was wrote for
ADT3.3
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > > > > Andy
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>