Jump to content

Recommended Posts

Posted

hello,

 

I'm searching for a routine (LISP or VBA) that will multiply a block to a given number of instances and that will also rename the blocks (like 1 to 200)

it will not be a problem if 2 routines are involved.

 

thanks in advance for help

Posted

why?

 

the advantage of blocks is that you have one definition in the drawing and 200 instances resulting in smaller drawing file that 200 identical blocks each with a different definition.

Posted

ok... that's way above me...

 

what I need is a lisp that will multiply a line X times and will add numbers from 1 to X.

 

maybe block is not the correct expression. "object" will be better? dunno, I'm a programmer, not an acad user, but this ended up on my desk...

Posted

yes, object would be much better. An AutoCAD block is a collection of objects defined once and used many times.

 

This would be better asked in the "LISP" forum but please don't multi post. Most of us wander from forum to forum. I'll see if a moderator is lurking and ask them to move it.

 

no sorry, no moderator online atm. I'll keep looking but maybe somebody will be along to give you some assistance.

 

To give the LISP guys something to work with, what excactly is the request that ended up on your desk?

Posted

thank you. I already did something by my own. still searching for a complete routine :)

I'm able to multiply lines :D still having troubles with attributes...

 

the request sounds like this: "we want to multiply this object X times and have the automatically numbered."

Posted

I KNEW I should have posted again rather than modify the above post. :)

 

Again, ATTRIBUTEs are particular to blocks. Do you need to use attributes or will TEXT do?

 

From above, what excactly have you been asked to do. What language do you usually use and what do you want this in?

Posted

Do you have the object? Is it something drawn? Is it bird or a mammal? err..sorry.

 

But if what you need is a numbering system, as in have a balloon with automatic numbering sequence, that I know is here somewhere.

 

Oh, and I moved the thread :thumbsup:

Posted

I solved the problem :D

12 lines of code and one export to csv and one import from csv and that's it.

 

thanks dbroada for enlightening me with the blocks :)

Posted

correct.

 

the code below multiplies and object.

 

------cut here------------

(defun c:myProg()

(if (setq myEnt(entsel))

(progn

(setq i (getint "\n No. of objects: "))

(setq x 10)

(setq y 10)

(repeat i

(setq x(+ x 10))

(setq y(+ y 10))

(command "copy" (car myEnt) "" x y)

)

)

(alert "Select an entity!")

)

(princ)

)

 

------------------cut here-----------------

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...