×
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

How to make bloks via VBA

How to make bloks via VBA

How to make bloks via VBA

(OP)
Hi,
  I want to make bloks with several attributes. I use Bloks.add() metod and it's work but evry new block that I create is added in the same block collection. When marking one of them they have all marked.
  I'm doing the same thing with autolisp routine. Inserting block via autocad command end it's work fine. But via VBA does not work.
  Please heilp me!

RE: How to make bloks via VBA

Are you giving each new block a unique name? Make sure any references to a block object in your routine is set to nothing before creating a new block.

"Everybody is ignorant, only on different subjects." — Will Rogers

RE: How to make bloks via VBA

(OP)
NO. I use ThisDrawing.Blocks.Add(insertionPoint,"Eltablo") evry time.

RE: How to make bloks via VBA

With the way you are doing it, you are redefining the block definition each time you do something to this named block. If you want to add different blocks in the drawing, you will have to name them uniquely when they are added.

"Everybody is ignorant, only on different subjects." — Will Rogers

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