Results 1 to 10 of 10

Thread: Lisp routine request: "Draw By Example"

  1. #1
    Login to Give a bone
    0

    Default Lisp routine request: "Draw By Example"

    Hello,

    I've been searching for a Lisp routine that behaves like the one in the old Softdesk 8 Auto Architect / Productivity Tools for R14, for use with ACAD 2000 (or above).

    When invoked, it allows you to pick any entity, text, block, line - whatever - changes to the layer the entity is on and invokes the command. Example: You invoke the "Draw By Example" Command, pick a line on Layer "Door", then allows you to draw a line on the "door" layer. It worked the same with text, blocks, circles, etc.

    Any help would be appreciated! Thanks....

  2. #2
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: Lisp routine request: "Draw By Example"

    Quote Originally Posted by matt.bachardy903119 View Post
    Hello,

    I've been searching for a Lisp routine that behaves like the one in the old Softdesk 8 Auto Architect / Productivity Tools for R14, for use with ACAD 2000 (or above).

    When invoked, it allows you to pick any entity, text, block, line - whatever - changes to the layer the entity is on and invokes the command. Example: You invoke the "Draw By Example" Command, pick a line on Layer "Door", then allows you to draw a line on the "door" layer. It worked the same with text, blocks, circles, etc.

    Any help would be appreciated! Thanks....
    Question: what if you pick block? what is the command associated with that? Insert?

    Here's the gist of it

    Code:
    (defun c:demo (/ objtype layer invoke)
      	(if (setq objtype (car (entsel "\Select Object:")))
    	  	(progn
    		  	(setq layer (cdr (assoc 8 (setq e (entget objtype)))))
    	  		(setq invoke (cdr (assoc 0 e)))
    		  	(setvar 'clayer layer)
    		  	(if (wcmatch invoke "*LINE")
    			  	(setq invoke (cadr
    					       (assoc
    						 invoke
    						 '(("POLYLINE" "3DPOLY")
    						   ("SPLINE" "SPLINE")
    						   ("LINE" "LINE")
    						   ("LWPOLYLINE" "PLINE")
    						  )
    					       )
    					     )
    					)
    			  )
    		  	(apply 'command (list invoke))
    		  )
    	  )(princ)
      )
    Last edited by pbejse; 2013-02-07 at 08:15 AM.

  3. #3
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Lisp routine request: "Draw By Example"

    What version are you using? The ADDSELECTED command was added in the 2011 version.

  4. #4
    Member
    Join Date
    2015-11
    Location
    Highlands ranch, CO
    Posts
    29
    Login to Give a bone
    0

    Default Re: Lisp routine request: "Draw By Example"

    Kent cooper made a lisp routine that (in my opinion) is better than ADDSELECTED. His routine can be found here:
    http://forums.autodesk.com/t5/Visual...07/m-p/2937680

    ~Greg

  5. #5
    Login to Give a bone
    0

    Default Re: Lisp routine request: "Draw By Example"

    I'm using ACAD 2012, and have the Dotsoft Toolpac add-on which includes a "draw by example" feature that works very well. Also, I use Revit 95% of the time for architectural work. ACAD is used for detailing and some limited architectural production work.

    I have an ACAD 2000 setup a part-time draftsman is using, so I'm wanting to get that machine into a more efficient drafting machine until we can afford to upgrade to another seat of Revit/ACAD. I've brought over many, many time saving lisp routines to the ACAD 2000 machine, but really miss the the "draw by example" routine.

  6. #6
    Login to Give a bone
    0

    Default Re: Lisp routine request: "Draw By Example"

    Yes, if you pick a block, it inserts the block on the same layer as the block you picked at the same scale as the block you pick. The same with text - if you pick a text entity, the routine invokes the text command, allowing you to insert text in the same style, scale and layer as the text you picked to use.

    I still have a Windows 98 machine running ACAD 14 / Softdesk Auto Architect 8 in operation and have spent a considerable amount of time digging through the lisp routines and menus and have yet to find the code for this. They've buried it quite well. Web searches have proved fruitless as well.

  7. #7
    Member
    Join Date
    2015-11
    Location
    Highlands ranch, CO
    Posts
    29
    Login to Give a bone
    0

    Default Re: Lisp routine request: "Draw By Example"

    Kent cooper made a LISP routine that (in my opinion) is better then ADDSELECTED found here: http://forums.autodesk.com/t5/Visual...07/m-p/2937680

    ~Greg

  8. #8
    I could stop if I wanted to
    Join Date
    2001-01
    Posts
    257
    Login to Give a bone
    0

    Default Re: Lisp routine request: "Draw By Example"

    Hi All
    Is it possible to add a reactor to Kent Cooper's "makemore.lsp" routine to have it restore the system variables back to their initial state? I love this routine but try as I might I cannot get it to restore the system variables. I have to manually do it. Any help is greatly appreciated. Thanks.
    Manuel A. Ayala

  9. #9
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Lisp routine request: "Draw By Example"

    Quote Originally Posted by cadconcepts View Post
    Hi All
    Is it possible to add a reactor to Kent Cooper's "makemore.lsp" routine to have it restore the system variables back to their initial state? I love this routine but try as I might I cannot get it to restore the system variables. I have to manually do it. Any help is greatly appreciated. Thanks.
    Manuel A. Ayala
    Newer version located http://cadtips.cadalyst.com/match-pr...cts-properties
    See if it's been fixed.

  10. #10
    I could stop if I wanted to
    Join Date
    2001-01
    Posts
    257
    Login to Give a bone
    0

    Default Re: Lisp routine request: "Draw By Example"

    Hi Tom
    I downloaded this version recently and it has the same problems as the earlier versions. I have in my arsenal of utilities one that stores system variables and one to restore them, but I am not able to get it to work this routine. This is why I am assuming that a reactor might be the solution. Thanks.
    Manuel

Similar Threads

  1. Replies: 14
    Last Post: 2015-08-21, 03:59 AM
  2. Replies: 3
    Last Post: 2014-04-04, 08:17 PM
  3. Request A "Click & Flip" Routine
    By BeKirra in forum AutoLISP
    Replies: 9
    Last Post: 2008-04-21, 04:54 AM
  4. Replies: 40
    Last Post: 2006-10-16, 05:02 PM
  5. Replies: 3
    Last Post: 2005-10-11, 06:59 PM

Posting Permissions

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