+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    j_r_auden
    Guest

    Default adding references in VBA

    Registered forum members do not see this ad.

    I have a VBA macro which tags each line on the screen with a block. The block has 2 attributes; size and length. Also, each one of these tags has a seperate attribute reference.

    So here are my questions.

    1. Is there any way to keep a macro running. Here's my problem. I have a counter that I use an attribute reference counter. It is incremented after each insertion of my block. My program tags all the lines, but if I draw another line and then tag that one, the attribute reference counter will be correct because the macro is no longer running. Is there any way to remedy this ???

    2. If I run my macro, and then copy one of my blocks, will the copy have a new attribute reference ?? If so how do I know what the reference is ??

  2. #2
    Super Member
    Using
    AutoCAD 2007
    Join Date
    Aug 2003
    Location
    Livingston, Scotland
    Posts
    995

    Default

    Registered forum members do not see this ad.

    I'm sorry, I've read and reread what you have written but I cannot make sense of it.

    The block has 2 attributes; size and length. Also, each one of these tags has a seperate attribute reference.
    a block has 2 attributes ~ ok ~ but you've lost me on the rest.
    Is there any way to keep a macro running.
    Yes various methods

    I have a counter that I use an attribute reference counter. It is incremented after each insertion of my block. My program tags all the lines, but if I draw another line and then tag that one, the attribute reference counter will be correct because the macro is no longer running. Is there any way to remedy this ???
    eh do you mean incorrect ?
    Consistency of approach. if you write a code to do one thing, then you go and do another, how is the code going to know ? unless you code for it.
    anytime you start the macro, you gather all the existing data, check it and get the highest number or whatever it is you are looking for

    If I run my macro, and then copy one of my blocks, will the copy have a new attribute reference ??
    Perhaps I don't understand what you are trying to do here but it looks like you are missing the point of blocks. Or are you talking about the attributes textstring ?
    ResourceCAD.... the Resource for your CAD Solutions

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts