Wednesday, August 13, 2008

An Automated Guiding System for Newcomers Using AutoCAD VBA and Microsoft Speech

Have you found the title a little bit confusing? Let me elaborate it. What we are going to see is a simple event oriented AutoCAD VBA program to guide newcomers in a company through proper way until they get familiar with Dos and Don'ts as well as company standards. The program given below is pretty simple and is only intented to show how the system can be implemented. It requires Microsoft Speech (Text-to-speech) to be available in your system. If you wish to implement a comprehensive system, you would better write your code in class modules. Again, this system is not recommended for experienced users as it will definitely check their patience. Here goes the code.

Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)

On Error Resume Next

Dim objSSV As Object

Set objSSV = CreateObject("Sapi.SpVoice")

With objSSV

Select Case CommandName


.speak "Please make sure that the saved drawing version is as per client standard"


.speak "All blocks shall be made in zero layer"

Case "LAYER"

.speak "Please refer CAD manual for standard layering system"


.speak "No standard blocks shall be exploded for editing"


.speak "Please contact CAD support before editing any standard blocks"

End Select

End With

Set objSSV = Nothing

End Sub

Keep the above code inside the 'ThisDrawing' section of Visual Basic Editor (for testing purpose) and turn the speakers on. Run any of the fore-mentioned commands inside AutoCAD. You will hear instructions based on the commands. Hope this system will help senior guys to avoid running behind the newcomers for correction and teaching purposes.

1 comment:

intercad said...

What is the course fee for solidworks in CADD centers in tamilnadu?

Solidworks 2012