[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Visual Basic in AutoCAD and SolidWorks, any Areas/Uses for me knowing it.

Posted on 2004-11-22
14
Medium Priority
?
448 Views
Last Modified: 2012-06-21
I feel it was a waste of time for me to learn the VB Object Model for AutoCAD and SolidWorks.   I am a Engineer and Programmer,  I currently do consulting for Programming.  I tought it was worth the time to learn "VB in CAD".  I discovered that it is very Powerful.  However I only use AutoCAD/SolidWorks to draft.  Very similar to a computer is meant for computing, however there are 'entertainment system' computers.  But I much rather buy a seperate computer and entertainment system.   ??????


-JP
0
Comment
Question by:sendtojp
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 18

Expert Comment

by:meintsi
ID: 12647276
I'm lost to what you are asking?  

<<I feel it was a waste of time for me to learn ...>>  So you know VB already ???

<<I tought it was worth the time to learn "VB in CAD".  I discovered that it is very Powerful. >>  These two contradict each other.

What is your question?
About VB in general? (uses in CAD or other?)
The SolidWorks API? (these is NOT part of normal VB>>>)
0
 
LVL 1

Author Comment

by:sendtojp
ID: 12648109
The VB Object Model refers to the Properties, Methods, and Events.  Word, Excel, Access, etc., as well as a Control such as a Textbox each have their own Object Model.  A Programmer 'reads' the Object Model as if it were a Map.  There are maps of Orange County CA, SLC, Denver, there are several metro areas. The person reading the map would be compaired a Visual Basic programmer, just as the person reading the map might not know these areas, but can read the map, the Visual Basic Programmer might not know the  VB Object Model, but can read the Object Model.

To explain where the term SolidWorks API falls in, the SolidWorks API (Application Programming Interface, I think) uses Visual Basic for Applications (VBA) to provide the interface.  This is no different in concept than the VBA in Word, Excel, Access, or etc.  Also Esprit CAM uses an API in VBA as well.  I find that Computer Technology people refer to it as VBA while Engineers refer to it as API.  I choose to refer to it from a Computer Technology stand point on this site.

Very Powerful didn't mean Useful.  Just as a 'Entertainment Center' may seem not practical, Visual Basic in these Drafting/Modeling Apllications doesn't to me, altough it is very flexible and seems to extend the ability of these Apllications.  
0
 
LVL 1

Author Comment

by:sendtojp
ID: 12648148
Any practical projects for this?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 1

Author Comment

by:sendtojp
ID: 12648166
I hope this better explains it.
0
 
LVL 18

Accepted Solution

by:
meintsi earned 672 total points
ID: 12648475
Do you do any repetitive and tedious tasks?

For instance, you design a spring using one of a variety of programs out there to do this. Wouldn't it be nice to "push a button" and:

1) All pertinent information is added to your local spring database.
2) SolidWorks automatically creates a model of the spring for use in assemblies and prompts you for a storage location and or name. (if it cannot be determined programatically)
3) Any paperwork required for the "release" of the spring is automatically generated and printed.
4) A journal entry is started and opened within Outlook to track work, time, costs, etc.

All of the four examples above can be further broken down to include many more tasks. Note blocks on drawings, automatic title block info, etc...

It's these kind of tasks that makes VB and the programs API so useful.
0
 
LVL 10

Assisted Solution

by:norrin_radd
norrin_radd earned 664 total points
ID: 12670495
plus with vba you can make applications talk to each other alot easier. ie. b.o.m.'s exported to excel
plus what I learned in one app I could easily use in another as far as code.
the addition of vb to acad was a tremendous achievement in my book, basically because I didnt have time to learn lisp.
0
 
LVL 13

Assisted Solution

by:Corey Scheich
Corey Scheich earned 664 total points
ID: 12795389
I just wrote an app yesterday I have an archive of thousands of parts and each of them has a material number assigned to it. Well changes in manufacturing caused a change in material where we used to have 10 different materials for different sized parts we now have a single material.  Now the material and description needs to change on thousands of drawings.  I wrote an application in Excel VBA to attach to both SW and AutoCad drawings and change this info from a list of part numbers on the excel spread sheet.  The computer will work all weekend and change almost every part I timed it for the autocad parts it takes 19 seconds each open the part search the attributes of the title block and change the apropriate ones save and close.  With the SW parts since the data is actually stored in the part file's custom properties I don't have to open them and was able to run 300 parts in less than a minute.  Then the program drops feedback into each row letting me know the status wether the file was accessable or not and which strings were found in the auto cad files.  I think it is pretty slick. only about 4 hours programming.

All that to say this.  API is very useful if you know how to do it.  VBA is a usefull tool that allows you to easily cross between applications.  API is refering to the fact that they left hundreds of useful tool available to you giving you the ability to create custom apps that SW or AutoCad couldn't write for lack of return on investment.  Why would they have written the app I described above.  It is specific to my situation, but because Autodesk and SolidWorks both decided to create API that I could access I was able to save tons of time in my task.  API isn't limited to VBA it can be accessed through C++, C, C#, VB, VB.NET and VBA I believe some have even ported it through JAVA and others.  It has also helped me work arround bugs in either program.  VB, VBA and VB.net are all very easy to understand to boot.

Corey
0
 
LVL 18

Expert Comment

by:meintsi
ID: 13132670
There's not much more that can be added.
The questioner asked for the uses of VB in CAD programs and received several.

His mis-understanding of the term API was also addressed, but without understanding exactly what the API is, and how it provides an interface into ANY program, useful" sub-programs"/macros cannot be developed.
0
 
LVL 13

Expert Comment

by:Corey Scheich
ID: 13132726
I whole heartedly agree.
0
 

Expert Comment

by:LaurieDakota
ID: 13138414
How much do you value your time?  If you feel that what you spent your time learning was a powerful application.  Then is was worth it because the time spent wasn't wasted and the more you know....
0
 
LVL 10

Expert Comment

by:norrin_radd
ID: 14163921
I think thats fair.
Thanks for taking the time Venabili
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If, like me, you find yourself repeatedly and tediously joining many segments (lines, arcs) in other people's drawings back into polylines that can be used more effectively in Computer Aided Machining and Laser Cutting, then this article is for you!…
In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question