Results 1 to 13 of 13

Thread: hi

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    10

    hi

    I want to develop one application in vb which ll access data from excel n it ll gives some output in autocad (which is like tree structure.)

    for developing such application which API i have to use??
    or how to develop application using VBA editor in autocad 2004??

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: hi

    Welcome to the Forums.

    Thread Moved

    What version of VB? VB 6 or VBA 6.3?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: hi

    from VBA in autocad you can create an object to automate excel
    do a search for late binding or look at robdogs tutorials and faqs
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  4. #4
    Banned
    Join Date
    Oct 2007
    Posts
    5

    Re: hi

    Welcome here, hope you success

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    10

    Re: hi

    Quote Originally Posted by RobDog888
    Welcome to the Forums.

    Thread Moved

    What version of VB? VB 6 or VBA 6.3?
    I am using vb 6.0 n autocad 2004...
    Last edited by jshr; Nov 14th, 2007 at 11:04 PM.

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: hi

    I dont have autocad but can you explain more on this "data from excel n it ll gives some output in autocad "?
    What output?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    10

    Re: hi

    Quote Originally Posted by RobDog888
    I dont have autocad but can you explain more on this "data from excel n it ll gives some output in autocad "?
    What output?
    suppose i want to draw one line in autocad for that i want to develop one application in vb 6.0 or i can use VBA editor in autocad 2004 for drawing that line. but the (parameters of line) point1 n point2 values i want to take from excel sheet...

    how to develop such app??

    this is small part of my project i explained you..

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: hi

    Yes, you will probably want to use Autocads VBA then. You should search its help file for nything on its VBA supportted functions and methods, looking for something that would look like a draw line function.

    To connect to Excel from Autocad VBA would be the same as connecting to Excel from VB 6 or any other Office app to Excel. Add a reference and create your application object, open the desired xls file and read in your data.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    10

    Re: hi

    Quote Originally Posted by RobDog888
    Yes, you will probably want to use Autocads VBA then. You should search its help file for nything on its VBA supportted functions and methods, looking for something that would look like a draw line function.

    To connect to Excel from Autocad VBA would be the same as connecting to Excel from VB 6 or any other Office app to Excel. Add a reference and create your application object, open the desired xls file and read in your data.
    but i there is no add references option in VBA autocad 2004.so i m not able to add excel library.. then how do i connect app with excel??

  10. #10
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: hi

    but i there is no add references option in VBA autocad 2004.so i m not able to add excel library.. then how do i connect app with excel??
    do a search here for latebinding to create an object
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  11. #11
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: hi

    Although this is for VB6, it still applies the same when you use it in Autocad VBA.
    http://vbforums.com/showthread.php?t=406640
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  12. #12

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    10

    Re: hi

    Quote Originally Posted by RobDog888
    Although this is for VB6, it still applies the same when you use it in Autocad VBA.
    http://vbforums.com/showthread.php?t=406640
    no it is not working in Autocad VBA....

  13. #13
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: hi

    You need to be more descriptive then "it doesnt work".

    Using Late Binding as in my examples it will work.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width