|
Thread: hi
-
Nov 14th, 2007, 03:48 AM
#1
Thread Starter
New Member
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??
-
Nov 14th, 2007, 04:26 AM
#2
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Nov 14th, 2007, 04:47 AM
#3
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
-
Nov 14th, 2007, 09:48 PM
#4
Banned
Re: hi
Welcome here, hope you success
-
Nov 14th, 2007, 10:59 PM
#5
Thread Starter
New Member
Re: hi
 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.
-
Nov 14th, 2007, 11:16 PM
#6
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Nov 14th, 2007, 11:34 PM
#7
Thread Starter
New Member
Re: hi
 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..
-
Nov 15th, 2007, 03:33 AM
#8
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Nov 15th, 2007, 04:05 AM
#9
Thread Starter
New Member
Re: hi
 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??
-
Nov 15th, 2007, 04:24 AM
#10
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
-
Nov 15th, 2007, 05:10 AM
#11
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Nov 15th, 2007, 07:19 AM
#12
Thread Starter
New Member
Re: hi
 Originally Posted by RobDog888
no it is not working in Autocad VBA....
-
Nov 17th, 2007, 06:09 AM
#13
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|