Visual Basic Customization

Reply
*Elmore, Andy
Message 1 of 21 (198 Views)

GetInterFaceObject

198 Views, 20 Replies
08-03-2003 07:06 AM
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
*Jobe, Ed
Message 2 of 21 (198 Views)

Re: GetInterFaceObject

08-03-2003 11:44 PM in reply to: *Elmore, Andy
Which interface are you trying to obtain?

--
Ed
--

"Andy Elmore" wrote in message
news:smileyvery-happy:EFEA0C19E3EB0AF0FE03EECC5B7A240@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
>
>
*Elmore, Andrew
Message 3 of 21 (198 Views)

Re:

08-04-2003 01:06 AM in reply to: *Elmore, Andy
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:smileyvery-happy:EFEA0C19E3EB0AF0FE03EECC5B7A240@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
> >
> >
>
>
*Jobe, Ed
Message 4 of 21 (198 Views)

Re:

08-04-2003 02:04 AM in reply to: *Elmore, Andy
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:smileyvery-happy:EFEA0C19E3EB0AF0FE03EECC5B7A240@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
> > >
> > >
> >
> >
>
>
*Elmore, Andrew
Message 5 of 21 (198 Views)

Re:

08-04-2003 04:53 AM in reply to: *Elmore, Andy
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:smileyvery-happy:EFEA0C19E3EB0AF0FE03EECC5B7A240@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
> > > >
> > > >
> > >
> > >
> >
> >
>
>
*Jobe, Ed
Message 6 of 21 (198 Views)

Re:

08-04-2003 06:50 AM in reply to: *Elmore, Andy
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:smileyvery-happy:EFEA0C19E3EB0AF0FE03EECC5B7A240@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
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
*Elmore, Andrew
Message 7 of 21 (198 Views)

Re: GetInterFaceObject

08-04-2003 08:43 AM in reply to: *Elmore, Andy
Will Autodesk post a working example of the getinterfaceobject for 04 the
example given in the help does not work.

"Andy Elmore" wrote in message
news:smileyvery-happy:EFEA0C19E3EB0AF0FE03EECC5B7A240@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
>
>
*Elmore, Andrew
Message 8 of 21 (198 Views)

Re:

08-04-2003 09:26 AM in reply to: *Elmore, Andy
What I'm wanting is through a VB not VBA loop through every wall style in
the document and display it.

"Andrew Elmore" wrote in message
news:E2FAA26FD4224A21B6DBECEB33DA597B@in.WebX.maYIadrTaRb...
> Will Autodesk post a working example of the getinterfaceobject for 04 the
> example given in the help does not work.
>
> "Andy Elmore" wrote in message
> news:smileyvery-happy:EFEA0C19E3EB0AF0FE03EECC5B7A240@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
> >
> >
>
>
*Elmore, Andrew
Message 9 of 21 (198 Views)

Re:

08-04-2003 09:34 AM in reply to: *Elmore, Andy
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:smileyvery-happy:EFEA0C19E3EB0AF0FE03EECC5B7A240@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
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
*Jobe, Ed
Message 10 of 21 (198 Views)

Re:

08-05-2003 12:27 AM in reply to: *Elmore, Andy
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:smileyvery-happy:EFEA0C19E3EB0AF0FE03EECC5B7A240@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
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community