Consulting

Results 1 to 3 of 3

Thread: AutoCad script

  1. #1
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location

    AutoCad script

    Hi,
    I'm looking for a bit of autocad script that will copy and paste an object (roof tile drawing) "x" times, offsetting each "y" left and "z" up. to end up with something like the attached.
    Regards
    MD
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  2. #2
    Moderator VBAX Master Tommy's Avatar
    Joined
    May 2004
    Location
    Houston, TX
    Posts
    1,184
    Location
    Hi MD,
    If you use the array command with dialogs you can do this pretty easy. The problem that is going to happen is the is no interaction with a script in Autocad. (You are using Autocad Lite right?) Therefore the only thing I can think of is to write a Macro in Excel that would generate a script. You would need to select the items to copy before running the script. The example below I tested and it worked somewhat, I have explainations that would of course need to be removed before execution.

    copy 'command
    p 'previous items that have been selected
    m 'the copied items are to be copied and placed multiple times
    0.0,0.0,0.0 ' base poit
    10.0,12.0,2.0 'copy to this point
    12.0,14.0,4.0 'copy to this point
    14.0,16.0,6.0 'copy to this point
    'terminate command
    Have the extra blank so Acad will know it is through.

    This is in 3D.

    Let me know if I am even close on this one, may be a space cadet today LOL

  3. #3
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Thanks Tommy,
    I'll give it a try on Monday.
    Regards
    Malcolm
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

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