+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20
  1. #1
    Junior Member
    Using
    AutoCAD 2007
    Join Date
    Oct 2007
    Posts
    13

    Default Lisp for inserting blocks without basic prompts

    Registered forum members do not see this ad.

    Hello,

    everytime when im inserting a block it ask's for:
    Specify insertion point or [Basepoint/Scale/X/Y/Z/Rotate]:
    Enter X scale factor, specify opposite corner, or [Corner/XYZ] <1>:
    Enter Y scale factor <use X scale factor>:
    Specify rotation angle <0>:

    Insertion point is usefull offcourse, but i want autocad to place the block immediatly without asking for scales en rotation angles. Is there any lisp who disable those prompts? And is there an tutorial how to apply a lisp?

    Thank you!

    Towel

  2. #2
    Banned Alan Cullen's Avatar
    Using
    Map 3D 2009
    Join Date
    Jun 2006
    Location
    Cairns, Queensland, Australia
    Posts
    4,181

    Default

    Towel,

    It can be done very easily. Just hang on while I go check what I have.

  3. #3
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro 4000, 2GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2014
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    38,279

    Default

    Why not just answer the questions re: scale and rotation in the Lisp routine by supplying the defaults?
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge! N-E-S-T-L-E-'S, Nestle's makes the very best......chocolate.

  4. #4
    Junior Member
    Using
    AutoCAD 2007
    Join Date
    Oct 2007
    Posts
    13

    Default

    Quote Originally Posted by Alan Cullen View Post
    Towel,

    It can be done very easily. Just hang on while I go check what I have.
    I will wait for ya

    thanks!

  5. #5
    Super Member GE13579's Avatar
    Computer Details
    GE13579's Computer Details
    Operating System:
    Windows XP
    Computer:
    Fujitso Siemens
    RAM:
    3.4Ghz
    Monitor:
    Samsung 19" TFT
    Using
    Mechanical 2009
    Join Date
    Feb 2007
    Location
    North East England
    Posts
    1,454

    Default

    Quote Originally Posted by Towel View Post
    And is there an tutorial how to apply a lisp?
    Check here...

    http://www.cadtutor.net/forum/showthread.php?t=1390

  6. #6
    Junior Member
    Using
    AutoCAD 2007
    Join Date
    Oct 2007
    Posts
    13

    Default

    Quote Originally Posted by GE13579 View Post
    Thank you! very usefull, i start with it when Alan is ready

  7. #7
    Banned Alan Cullen's Avatar
    Using
    Map 3D 2009
    Join Date
    Jun 2006
    Location
    Cairns, Queensland, Australia
    Posts
    4,181

    Default

    Okay, here's a very basic lisp. But make sure the folder your blocks are in, is in the acad search path.

    Code:
    (defun c:bli ()
     (setq bname (getstring T "Block name? "))
     (setq pt (getpoint "insertion point? "))
     (command "-insert" bname pt 1.0 1.0 "")
    )

  8. #8
    Junior Member
    Using
    AutoCAD 2007
    Join Date
    Oct 2007
    Posts
    13

    Default

    Quote Originally Posted by Alan Cullen View Post
    Okay, here's a very basic lisp. But make sure the folder your blocks are in, is in the acad search path.

    Code:
    (defun c:bli ()
     (setq bname (getstring T "Block name? "))
     (setq pt (getpoint "insertion point? "))
     (command "-insert" bname pt 1.0 1.0 "")
    )
    Did, but still i have to enter x-factor, y-factor and rotation:

    Command: _appload bli.lsp successfully loaded.
    Command:
    Command:
    Command:
    Command: -insert Enter block name or [?] <CP>: Str15 Specify insertion point or
    [Basepoint/Scale/X/Y/Z/Rotate]:
    Enter X scale factor, specify opposite corner, or [Corner/XYZ] <1>:
    Enter Y scale factor <use X scale factor>:
    Specify rotation angle <0>:

  9. #9
    Banned Alan Cullen's Avatar
    Using
    Map 3D 2009
    Join Date
    Jun 2006
    Location
    Cairns, Queensland, Australia
    Posts
    4,181

    Default

    I just tested it. At the command line, type BLI, then fire away.

  10. #10
    Junior Member
    Using
    AutoCAD 2007
    Join Date
    Oct 2007
    Posts
    13

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by Alan Cullen View Post
    I just tested it. At the command line, type BLI, then fire away.
    yeh sorry it works.. but now I have to do it by calling the name of the file . Cant it just be done by the old fashion way: drag block from windows explorer, pulldown menu or insert-block etc? Or should i change something in an .lsp that already excists?

Similar Threads

  1. Inserting Blocks
    By happyunited in forum AutoCAD Drawing Management & Output
    Replies: 11
    Last Post: 23rd Jul 2007, 04:27 pm
  2. Inserting blocks
    By johnengineer in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 25th Apr 2007, 05:01 pm
  3. Inserting Blocks
    By johnengineer in forum AutoCAD General
    Replies: 2
    Last Post: 16th Mar 2007, 04:53 pm
  4. Inserting Blocks
    By DODGE in forum AutoCAD Drawing Management & Output
    Replies: 11
    Last Post: 1st Mar 2007, 02:25 pm
  5. Inserting blocks
    By misha in forum AutoCAD General
    Replies: 1
    Last Post: 1st Jun 2006, 02:33 am

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