+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Junior Member
    Using
    AutoCAD 2013
    Join Date
    Feb 2014
    Posts
    10

    Default automating block insertion

    Registered forum members do not see this ad.

    Hi!

    I'm looking for a script that does this:

    insert block from specific (non changing) folder,
    *type in name of block*
    no rotation
    no scaling
    insert to picked point on screen

    (meaning- i only want to type the name end pick a point of insertion)

    any ideas?

    thanks a lot!

  2. #2
    Forum Deity steven-g's Avatar
    Computer Details
    steven-g's Computer Details
    Operating System:
    Win 7
    Discipline
    Construction
    steven-g's Discipline Details
    Occupation
    Draughtsman
    Discipline
    Construction
    Details
    I work in the estimating department of a large building contractor.
    Using
    AutoCAD 2017
    Join Date
    May 2013
    Location
    An Englishman in Belgium
    Posts
    2,059

    Default

    This macro will do that, it starts the insert command, pauses for you to input the block name, asks for the insertion point, and inserts at normal scale and zero rotation.
    Code:
    ^C^C^Ci;\\1;0;
    You could also create a toolpalette with the various blocks, so you only need select the right one and then pick a point, obviously it depends on how many blocks you have.

  3. #3
    Junior Member
    Using
    AutoCAD 2013
    Join Date
    Feb 2014
    Posts
    10

    Default

    thanks Steven,

    but how do I set the block's folder location?

  4. #4
    Forum Deity steven-g's Avatar
    Computer Details
    steven-g's Computer Details
    Operating System:
    Win 7
    Discipline
    Construction
    steven-g's Discipline Details
    Occupation
    Draughtsman
    Discipline
    Construction
    Details
    I work in the estimating department of a large building contractor.
    Using
    AutoCAD 2017
    Join Date
    May 2013
    Location
    An Englishman in Belgium
    Posts
    2,059

    Default

    Add it to the support path, in tools - options - support file search path.

  5. #5
    Full Member
    Computer Details
    JGA's Computer Details
    Operating System:
    Win7
    Using
    AutoCAD 2014
    Join Date
    Jul 2007
    Location
    Scotland
    Posts
    77

    Default

    I think a toolpallete would be the simplest answer, you wouldn't have to add a folder to the support path.

  6. #6
    Super Member Tuns's Avatar
    Computer Details
    Tuns's Computer Details
    Operating System:
    Windows 7 (64-bit)
    CPU:
    Intel Core I3-2120
    RAM:
    4.0 GB
    Using
    AutoCAD LT 2014
    Join Date
    Jun 2013
    Location
    San Antonio, Texas
    Posts
    784

    Default

    Or you can just add the file path to the macro.
    Never argue with an idiot. He will drag you down to his level and beat you with experience.

  7. #7
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,879

    Default

    2nd go down the tool palette path or a menu or old fashioned like me.
    ScreenShot004.jpg
    A man who never made mistakes never made anything

  8. #8
    Junior Member
    Using
    AutoCAD 2013
    Join Date
    Feb 2014
    Posts
    10

    Default

    Thank's again for all of your advice!

    I'd rather just type the serial No. ,then trying to find it in the tool-palette

  9. #9
    Junior Member
    Using
    AutoCAD 2013
    Join Date
    Feb 2014
    Posts
    10

    Default

    Hello again!

    I have a follow-up challenge here-
    the command works great on simple blocks, but It won't insert any block inside the requested block, even when they are both in the same folder...
    any ideas?

  10. #10
    Forum Deity steven-g's Avatar
    Computer Details
    steven-g's Computer Details
    Operating System:
    Win 7
    Discipline
    Construction
    steven-g's Discipline Details
    Occupation
    Draughtsman
    Discipline
    Construction
    Details
    I work in the estimating department of a large building contractor.
    Using
    AutoCAD 2017
    Join Date
    May 2013
    Location
    An Englishman in Belgium
    Posts
    2,059

    Default

    Registered forum members do not see this ad.

    It should work, check that you don't have conflicting names or layers, if you can't see anything obvious then try posting the files here for someone to check for less obvious causes

Similar Threads

  1. Block insertion routine based on part block file name
    By legg1979 in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 25th Aug 2013, 06:02 pm
  2. Block Insertion
    By Squirltech in forum AutoCAD General
    Replies: 4
    Last Post: 9th Sep 2012, 12:40 pm
  3. Insertion of block
    By au-s in forum AutoLISP, Visual LISP & DCL
    Replies: 18
    Last Post: 12th Feb 2009, 12:15 pm
  4. Node at insertion of a block
    By Tunnelrat in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 7th Jan 2009, 03:30 pm
  5. Block Insertion Failed
    By Cad64 in forum AutoCAD Drawing Management & Output
    Replies: 6
    Last Post: 7th Mar 2008, 06:25 pm

Tags for this Thread

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