gixxer Posted July 12, 2010 Posted July 12, 2010 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. 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. Quote
gixxer Posted July 12, 2010 Author Posted July 12, 2010 Edit: It's to be used in AutoCAD 2007/8. Quote
Lee Mac Posted July 12, 2010 Posted July 12, 2010 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). Quote
gixxer Posted July 12, 2010 Author Posted July 12, 2010 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'? Quote
Lee Mac Posted July 12, 2010 Posted July 12, 2010 Whats 'pseudo-code'? Code that maps out the intention of the program without any syntax etc. Quote
Recommended Posts
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.