CadGuruCool
Source Code Page 1 of 3




Feel Free to Fiddle with the Free code

 
Legend

  AutoLISP routine

  DCL based AutoLISP routine

  MAX Script / Visual MAX Script

  Visual Basic for Applications (AutoCAD) Code

  Visual Basic for Applications (Solid Edge) Code


Click filenames to access and enjoy !
 

   
Cartproj.zip
(21 kb)
Development of Surfaces (Carton) and Layout on a Cardboard Sheet.
Written in AutoLISP, features a sleek dialog interface.
  Hatch12.zip
(1 kb)

Cool hatch patterns. After unzipping, read coolpat.txt

...
    CNCCNC.zip
(2 kb)

Basic Algorithm to develop a CNC G-Code generator within AutoCAD. All Mechano AutoLISP hackers attempt this once in their lifetime. Here's mine.


A project on CNC Milling - EasyCAM is sitting at the AutoLISP Projects
page. This is a complete bomb. happy hacking !

For a tutorial on CNC programming, go to Tutorials 4U page.
 

   
Convert.zip
(9 kb)
DCL - Converts values from all units you may have ever heard of.

Also, demonstrates all the tiles - toggles to sliders - in a Dialog Box.
    PRing.zip
(6 kb)


MaxScript - Create with a single click, this Piston with Piston Rings and connecting rod.
Modeless floater interface
Interacive Color Updater
Option to quick render upon completion
Option to Union Piston Head with the body

I have tested this one in 3D Studio Max R 2.5 through R 4.2.
Give it a try and don't forget to tweak.

Read MaxScript.txt for step by step instructions on how to use MAX Script after you unzip.

For a tutorial on MAX Script and Visual MAX Script, go to Tutorials 4U page. Happy Scripting !
 
 

 
Combo.zip
(2 kb)
Simulation of a Combo Box not found in DCL.

 
SEX.zip
(1 kb)
Cool DCL Program that tells your SEX. Just enter your name.

 
FolderBrowse.zip
(1 kb)
A VBA module you can incorporate in your macros to display the "browse for folder" dialog.

 
SvScr.zip
(3kb)
Written in AutoLISP, a cool screensaver for AutoCAD.
Just accept the default values.
  Q.zip
(1 kb)
Single key Shortcut to 12 AutoCAD commands.

This is an award winner from CADALYST for CadGuruCool.
(See Tip1488.lsp - Jan 99)


 
 

   
AutoCAPS.zip
(5 kb)
VBA code with a form - shows how you can automatically convert text entered in a text-box to uppercase.

   
Bcounter.zip
(9 kb)

VBA project with form - counts the number of blocks and the number of instances of each block and displays in a list box.

For a tutorial on detailed explaination of the code for this project, go to Tutorials 4U page.
 
    vlxxGear.zip
(1 kb)

Visual LISP code listing

  • Create a persistent gear train given RPM, Gear Ratio, Diametral Pitch, Shaft Diameter.
  • Due to inclusion of Reactors, when you erase the gear train, the callback function prompts you to reenter the data and creates a new gear again.
     
  •   VBseRib.zip
    (2 kb)

    Visual Basic for Solid Edge code.

  • This program uses the Add method to create a rib feature.
  • You must have an existing part as shown in figure below:
  • It is a box that is open on the top and is approx. 4 inches (10 cm) square.
  • The box is approx. centered about the base reference planes.
  • Solid Edge should be running and the box model active.
  • To use, paste the code into the General section of a form, then press F5 and click the form.

  •  

       
    DwgInfo.zip
    (7 kb)
    VBA code that tells whether the current drawing is saved or not and also the location of the ACAD.EXE file.
     

       
    IdLisp.zip
    (5 kb)
    This AutoLISP program prompts and allows the user to click as many times in the drawing area as required and exports the X, Y and Z coordinates of all the points to a text file.

       
    PassPass.zip
    (6 kb)
    VBA code that shows how to implement password protection in your projects.

       
    DDra.zip
    (15 kb)
    DCL : Dialog Interface for rectangular array..

       
    Preview.zip
    (9 kb)

    VBA code with form that allows you to pick entities in the drawing area and displays them in a picture box.

    You can further clip or zoom within the picture box itself.
     

       
    PushButton.zip
    (1 kb)
    Simulation of a push button not found in DCL.
     
        VBsePolr (2kb)
    Visual Basic for Solid Edge code demonstrates how you can create bolt holes on a circular flage using the PolarArray feature.

  • Copy this code to the Click event of a button
  • Name the button - cmdCircularPattern
  • Solid Edge should be running but no document be open
  • Tested with Solid Edge 7 only - They dropped the objModel.CircularPatterns.Add method in SolidEdge 10

  •  

       
    table.zip
    (1 kb)
    Draw a 3D Table - AutoLISP

       
    VBseRevl.zip
    (2kb)
    Visual Basic for Solid Edge code. Create revolved feature.
        WallDoor.zip
    (6 kb)



    MaxScript - Create this wall with a door opening instantly in 3D Studio MAX.
  • Modeless floater interface.
  • Interactively adjust wall width, height, thickness and color after creation.
  • Change door positon interactively.
  • Option to quick render upon completion.
  • New - Automatic Door Kill.
  • I have tested this one in both 3D Studio Max R 2.5 and R 3.0. Give it a try and don't forget to tweak.

    Read MaxScript.txt For step by step instructions on how to use MAX Script after you unzip.

    For a severely indepth and illustrated tutorial on MAX Script and Visual MAX Script go to Tutorials 4U page.....Happy Scripting!

  •  
      SunBurn.zip
    (4 kb)



    Sunburn effect rendered in 3D Studio Max 2.5. The accompanying max file contains more special effects. Recreate this for yourself and tweak. The details are available in the SunBurn.txt file.

    For a tutorial on Creating Special Effects in MAX, go to Tutorials 4U page.
     
     

       
    VBseFull.zip
    (1 kb)

    Visual Basic for Solid Edge code.

    When connecting to the OLE object, display Solid Edge window in FullScreen mode.
     

       
    VBA2PtCr.zip
    (1 kb)
    VBA code that draws circle passing through 2 points without the AutoCAD command.
    Lots of geometry n algorithm n VBA.

       
    VBA3PtCr.zip
    (1 kb)
    VBA code that draws circle passing through 3 points without the AutoCAD command.
    Lots of geometry n algorithm n VBA.

       
    VBAboxTx.zip
    (1 kb)
    VBA code to creates text entity with a polyline border around it.

       
    VBAcen3p.zip
    (1 kb)
    VBA code to calculate the centroid of a scalene triangle using the perpendicular bisector method....Happy scratching.
      ShpHamer.zip
    (1 kb)



    AutoCAD Shape file and compiled .shx file to create this hammer.

    For an indepth and illustrated tutorial on Creating Shape files in AutoCAD, go to the Tutorials 4U page.
     

    Now some graphics download - most of em are dwg files

     
      A.   Revolver.zip
     

    Take this 3D revolver for a click. Happy Firing !
     
      B.   Longtruck.zip
     

      Take this long truck on a long drive.
     
      C.   Beetle.zip
     

      The legendary beetle. Download now !
     
      D.   mir.zip
     

      Panoramic 3D view of the Mir international space station complete with all the finest detalis.
     
      E.   Valves.zip
      135 (that is 135) blocks of detailed valves of all types. Mechnos ! you just can't afford to skip this.
     

    More graphics download on page 2

     


    Full blown projects in AutoLISP and VBA, are on the AutoLISP Projects page.



    Thats not the END.

    More LSPs
    More DCLs - More VBA
    More VLISP - More DWG
    More MAX - More More
    More More More
    On Next Page...

    Click Here for Page 2


    Home
    Source Code 1 2 3   |   Queries and solutions   |   AutoLISP Projects
    Tips n Tricks   |   Knowledge Base   |   Tutorials 4U   | Daily AutoLISP Code
    CAD Standards   |   Fatal Errors   |   Real ACAD User   |   CAD Cartoons
    CAD CrossWord   |   CAD Games   |   CAD Puzzle   |   CAD Illusions   |   CAD Cans
    Easter Egg   |   CAD WinAmp Skins   |   Seven Habits   |   About Me

    Also visit :   CadGuruCool   |   SeGuruCool   |   ProeGuruCool