×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

LISP code to assemble parts?

LISP code to assemble parts?

LISP code to assemble parts?

(OP)
I do a lot of machinery drawings that are repetitive -- the machine has the same drive and end unit each time and the main thing that changes is overall length, which means I add 5 or 10-ft sections between the drive and end unit until the length is correct.  Can anyone point me at some sample LISP code that would do something like this?  I work in 3D if that matters.  I have the feeling it would involve simple copying and pasting using the drive as the base point and then incrementing the length 10 ft each time until the overall length is reached.  Even better would be code that would link to an Excel spreadsheet where I could enter machine parameters and have AutoCAD build it for me.

RE: LISP code to assemble parts?

I >>> conjecture <<< that you could build such a modular machine model outside of AutoCAD, e.g. with a scripting language like awk, by concatenating fragments of DXF files, e.g. standard DXF preamble + end A + N modular sections + end B + standard DXF file terminator, to make a single DXF file that would open to reveal the machine you want.

I face a similar problem generating machines that are modular in more than one dimension, and I keep daydreaming about ways to make it easier ... if your machine really is modular in just one dimension, the problem should become much simpler.  In theory.  

Mike Halloran
Pembroke Pines, FL, USA

RE: LISP code to assemble parts?

try dynamic blocks

RE: LISP code to assemble parts?

(OP)
Actually I just started learning how to use dynamic blocks after I posted that message.  Is there a way to have a visibility state linked to length?  i.e. I have blocks of 2, 4 and 8 units length.  Machine starts with a common head unit, then can have the possible combinations:

head+2+8n+tail
head+4+8n+tail
head+2+4+8n+tail
head+8n+tail

8n can be any number of the 8 unit sections, so an array takes care of that.  I can make visibility states for each of the above cases and use multiple arrays to make the 2,4,8 units show up when I want to, but then manually have to set the visibility state for the whole thing.  It would be slick if it could be linked though, or if an expression could be used to decide whether or not to even use a 2, 4, or 8 unit section in the first place based on the distance.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources