doubt in api part of map

doubt in api part of map

Anonymous
Not applicable
329 Views
4 Replies
Message 1 of 5

doubt in api part of map

Anonymous
Not applicable
hi,

i have a problem in api>>>i'm using AutoCAD Map 2000i>>>but i've got api pdf document for Map 2000. i've started working using it. Now the problem is>>>

it has been written in the pdf document that to interact with Map using vb(not vba) the following code should be written
*****************
dim acadapp as object
dim amobj as acadmap
set acadapp = getobject(, "autocad.application")
set amobj = acadapp.getinterfaceobject("autocadmap.application")
*******************
i wrote the above code in vb>>>
but it is giving some error>>>so plz let me know the right procedure to interact with autocadmap using vb>>>and also plz let me know where can i get the pdf document about api of AutoCAD Map 2000i so that i can download it

thanx in advance

baburao
0 Likes
330 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Have you tried late binding the Map object with,

 

dim acadapp as AcadApplication

dim amobj as object

set acadapp = getobject(, "autocad.application")

set amobj =
acadapp.getinterfaceobject("autocadmap.application")

 

Barry


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
hi,

have a problem in api>>>i'm using AutoCAD Map
2000i>>>but i've got api pdf document for Map 2000. i've started
working using it. Now the problem is>>>

it has been written in the pdf document that to interact with Map using
vb(not vba) the following code should be written

  • **************** dim acadapp as object
    dim amobj as acadmap
    set
    acadapp = getobject(, "autocad.application")
    set amobj =
    acadapp.getinterfaceobject("autocadmap.application")
  • ****************** wrote the above code in vb>>> but it is
    giving some error>>>so plz let me know the right procedure to
    interact with autocadmap using vb>>>and also plz let me know where
    can i get the pdf document about api of AutoCAD Map 2000i so that i can
    download it
  • thanx in advance

    baburao

    0 Likes
    Message 3 of 5

    Anonymous
    Not applicable
    Hai Barry,

    Thanks for ur help.
    Can I get to know where can I find complete documentation for AutodeskMap2000i API?
    I would be grateful if u could help me in this regards.

    Regards,
    Baburao.
    0 Likes
    Message 4 of 5

    Anonymous
    Not applicable

    Hi BabuRao,


    In VB to make the your code run without any errors you should use late

    binding(which I guess you are doing). Please run this code wherever you have
    problems and check if pProj is
    nothing or not.

    Private Sub
    Command1_Click()
    Dim pAcadApp As AutoCAD.AcadApplication
    Dim pMapApp As
    Object
    Dim pProj As Object

    Set pAcadApp = GetObject(,
    "AutoCAD.Application")

    Set pMapApp =
    pAcadApp.GetInterfaceObject("AutoCADMAP.Application")

    Set pProj =
    pMapApp.Projects(0)
    End Sub


    For more help on Map API you need to install the Object Arx for Map and look
    for .chm (For example acmaparx.chm) files in the instillation directory.


    To view the ActiveX Automation API Help, double-click the AcMapAtm.chm
    file in the Autodesk Map 2000i \Help folder.


    If you are ADN member you can download the required information from
    adn.autodesk.com


    You need to enter the 'AutoCAD Map 2000i API' as a search string in the
    adn.autodesk.com and you notice bunch of matched items.


    One of such item is http://adn.autodesk.com/techsupp/nodes/120015.htm


    Hope this helps.


    Cheers,


    Ramana Kumar



    style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

    Have you tried late binding the Map object with,

     

    dim acadapp as AcadApplication

    dim amobj as object

    set acadapp = getobject(, "autocad.application")

    set amobj =
    acadapp.getinterfaceobject("autocadmap.application")

     

    Barry


    style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
    hi,

    have a problem in api>>>i'm using AutoCAD Map
    2000i>>>but i've got api pdf document for Map 2000. i've started
    working using it. Now the problem is>>>

    it has been written in the pdf document that to interact with Map using
    vb(not vba) the following code should be written

  • **************** dim acadapp as object
    dim amobj as acadmap
    set
    acadapp = getobject(, "autocad.application")
    set amobj =
    acadapp.getinterfaceobject("autocadmap.application")
  • ****************** wrote the above code in vb>>> but it
    is giving some error>>>so plz let me know the right procedure to
    interact with autocadmap using vb>>>and also plz let me know where
    can i get the pdf document about api of AutoCAD Map 2000i so that i can
    download it
  • thanx in advance

    baburao

    0 Likes
    Message 5 of 5

    Anonymous
    Not applicable
    hi ramana,

    thanx for ur response

    like i've worked on the code which u have given me...
    it is working without any errors...but the
    properties of pProj are not coming...but i want the properties of AutoCAD Map,

    it is working bcoz u've declared the pMapApp as object...but in the help file it was written that
    it should be declared as AutoCADMap...

    so please differentiate me between these two
    and also i want the properties of pMapApp...
    so please help me in that...

    thanx in advance

    Baburao
    0 Likes