Jump to content

Recommended Posts

Posted

Hi all,

 

I often view this forum for hints and tips but have a question I can't find an answer to so I've taken the plunge and decided to join. :D

 

I'm trying to create a function that will: 1) Select a named block and move it to a new co-ordinate, then 2) insert a new block at a pre-specified point.

 

Basically it's so I can add a new block to a drawing frame and one of the existing blocks within it moves to accommodate it. (if that makes sense).

 

I've dabbled with lisp routines and using the tool pallets in the past but never for this kind of thing. How should I go about it?

 

Cheers.

Posted

Edit: It's to be used in AutoCAD 2007/8.

Posted

Think about how you might approach it in 'pseudo-code':

 

  • Prompt user for selection of block(s) to move (ssget or entsel)
  • Prompt user for selection of new block file to insert (block name hard coded into program?) (getfiled)
  • Prompt user for insertion for new block (again, should this be hard coded into the program? - will it be the same every time?)
  • Insert new block if possible (command "_.-insert" or vla-insertblock or entmake).

Posted
Think about how you might approach it in 'pseudo-code':

 

  • Prompt user for selection of block(s) to move (ssget or entsel)
  • Prompt user for selection of new block file to insert (block name hard coded into program?) (getfiled)
  • Prompt user for insertion for new block (again, should this be hard coded into the program? - will it be the same every time?)
  • Insert new block if possible (command "_.-insert" or vla-insertblock or entmake).

 

You might have to go back a few stages here as I really am a begiinner at this. Whats 'pseudo-code'?

Posted
Whats 'pseudo-code'?

 

Code that maps out the intention of the program without any syntax etc.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...