+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20
  1. #11
    Super Member ASMI's Avatar
    Using
    AutoCAD 2008
    Join Date
    Nov 2005
    Location
    Oceanus Procellarum, Moon
    Posts
    1,427

    Default

    Registered forum members do not see this ad.

    Some changes was made in c:3pl function for best work.

  2. #12
    Super Member ASMI's Avatar
    Using
    AutoCAD 2008
    Join Date
    Nov 2005
    Location
    Oceanus Procellarum, Moon
    Posts
    1,427

    Default

    One suggestion, if you are going to redefine the *error* function, you should consider saving the old *error* function and restoring it at the completion of your routine.
    If you write *error* function as local variable and your *error* is interanal function no need to save and restore original *error* function:

    Code:
    (defun myFun (/ *error* ....)
    
      (defun *error*(msg)
      .....
       ); end of *error*
    ......
    ); end of myFun
    The changed version of error handler will exist only during work of your function. You can will be convinced of it if will lead experiment. It seems to me is the extremely convenient than each time to save and restore the handler.

  3. #13
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Motherboard:
    Intel DZ77RE-75K
    CPU:
    i7-3770K 3.50GHz
    RAM:
    32GB
    Graphics:
    Nvidia Quadro 2000
    Primary Storage:
    125GB SSD
    Secondary Storage:
    500GB SATA
    Monitor:
    ASUS 27" / ASUS 24"
    Discipline
    Civil
    Using
    Civil 3D 2013
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    3,633

    Default

    Quote Originally Posted by ASMI View Post
    If you write *error* function as local variable and your *error* is interanal function no need to save and restore original *error* function:
    You are right, I missed the fact that it was a local function.

  4. #14
    Super Member ASMI's Avatar
    Using
    AutoCAD 2008
    Join Date
    Nov 2005
    Location
    Oceanus Procellarum, Moon
    Posts
    1,427

    Default

    Coming back to a 'best' *.lsp. Look 'Get the code!' on www.cadalyst.com. It is impossible to tell that all the published programs concern to the category of the 'best', however they pass preliminary selection and among them is a lot of good.

  5. #15
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Motherboard:
    Intel DZ77RE-75K
    CPU:
    i7-3770K 3.50GHz
    RAM:
    32GB
    Graphics:
    Nvidia Quadro 2000
    Primary Storage:
    125GB SSD
    Secondary Storage:
    500GB SATA
    Monitor:
    ASUS 27" / ASUS 24"
    Discipline
    Civil
    Using
    Civil 3D 2013
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    3,633

    Idea

    Here is one that is in discussion in the AUGI forums....

    I took the original and made a few changes. The purpose is to save an *additional* backup copy (above and beyond the BAK file) of the current drawing when you save. I wouldn't necessarily use this, but for some, this may be desired. (anyone using this might want to alter the path for the extra file - which is currently set to C:\)

    Code:
     (DEFUN C:MRSAVE (/ newname)
       (setvar "CMDECHO" 0)
       (if (zerop (getvar "dwgtitled"))
     	(command "._qsave" (getstring "\n Enter drawing name: "))
     	(command "_.qsave")
       )
       (setvar "filedia" 0)
       (setq newname 
     		(strcat
     		  "C:\\"
     		  (getvar "DWGNAME")
     		  "-BAK"		  
     		)
       )  
       (if (findfile (strcat newname ".dwg"))
     	(command "_.save" newname "_Y")
     	(command "_.save" newname)
       )
       (setvar "filedia" 1)
       (princ)
     )

  6. #16
    Luminous Being StykFacE's Avatar
    Computer Details
    StykFacE's Computer Details
    Operating System:
    Windows 7 Ultimate 64bit
    Computer:
    Dell Precision T3500
    Discipline
    Multi-disciplinary
    StykFacE's Discipline Details
    Occupation
    BIM Manager & Design Specialist
    Discipline
    Multi-disciplinary
    Details
    Facilities engineering, involving mechanical piping, mechanical HVAC and electrical engineering.
    Using
    Revit 2013
    Join Date
    Mar 2006
    Location
    Dallas, TX - USA
    Posts
    6,497

    Default

    Quote Originally Posted by ASMI View Post
    Coming back to a 'best' *.lsp. Look 'Get the code!' on www.cadalyst.com. It is impossible to tell that all the published programs concern to the category of the 'best', however they pass preliminary selection and among them is a lot of good.
    yeah i've spent lots of time looking through all those archives. some definite good stuff in there. i didn't even think about posting that link
    Tannar Frampton | Facilities Engineering | Revit 2013
    Personal Projects | Fender Squier Stratocaster | Custom Smoker | Concrete Patio

  7. #17
    Full Member
    Discipline
    Electrical
    btraemoore's Discipline Details
    Occupation
    Electrical Designer
    Discipline
    Electrical
    Using
    Electrical 2012
    Join Date
    Apr 2012
    Location
    Houston
    Posts
    55

    Default

    www.lee-mac.com this guy has everything for lisp... he is on here very frequently... amazing writer

  8. #18
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,743

    Default

    Quote Originally Posted by btraemoore View Post
    www.lee-mac.com this guy has everything for lisp... he is on here very frequently... amazing writer
    Cheers Trae! I really appreciate your recommendation and compliments for my work
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  9. #19
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,791

    Default

    Back to Designer what are you using Autocad for then you will get lots of relevant hints about Lisp programs out there.

    Totally agree have a look at Lee-Macs site first some great stuf.
    A man who never made mistakes never made anything

  10. #20
    Senior Member troggarf's Avatar
    Computer Details
    troggarf's Computer Details
    Operating System:
    Windows 7
    Computer:
    Toshiba Satellite L675
    Using
    AutoCAD 2012
    Join Date
    Oct 2010
    Location
    Littleton, Co
    Posts
    130

    Default

    Registered forum members do not see this ad.

    I use this simple one from Kent Cooper a ton. It simply joins all entities that touch at their endpoints into a polyline by simply selecting on object in the chain.
    Code:
    ;Entity Join All
    ;Joins lines, arcs & Polylines at their endpoints automatically.
    ; All you have to do is select one object
    ; by Kent Cooper @ Autodesk forums
    
    (defun C:EJA (/ peac cmde); = Polyline Edit: Join All
      (setq peac (getvar 'peditaccept))
      (setvar 'peditaccept 1)
      (setq cmde (getvar 'cmdecho))
      (setvar 'cmdecho 0)
      (command "_.pedit" pause "_join" "_all" "" "")
      (setvar 'peditaccept peac)
      (setvar 'cmdecho cmde)
      (princ)
    )
    ~Greg B
    Have fun!! www

Similar Threads

  1. Changing NTF files to DWF files, Can you download the NTF AutoCAD add on?
    By BenGoble in forum AutoCAD Drawing Management & Output
    Replies: 4
    Last Post: 1st May 2010, 02:44 pm
  2. Image Files and Rotation of AutoCAD Files
    By Michigan Engineer in forum AutoCAD Drawing Management & Output
    Replies: 1
    Last Post: 25th May 2006, 08:28 pm
  3. How do I convert .dwg files to .plt files in Autocad 2000?
    By DPATTERSON23 in forum AutoCAD General
    Replies: 2
    Last Post: 21st Jan 2006, 08:01 pm
  4. dwg files to iges files (urgent!!!)
    By JULES in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 8th Nov 2005, 01:38 am
  5. Need Help converting 2D Autocad files to 3D stl files
    By 3dr in forum AutoCAD 3D Modelling & Rendering
    Replies: 0
    Last Post: 22nd Jun 2005, 09:18 pm

Bookmarks

Posting Permissions

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