Change insertion point in attribute

Discussion in 'AutoCAD' started by d_r_wright, Apr 7, 2004.

  1. d_r_wright

    d_r_wright Guest

    Greetings,

    I have done this kind of substitution plenty of times with dotted pairs but I guess it is a little trickier with insertion points which is not a dotted pair.

    I have a variable, E300, which is the associate list of an attribute in a block and contains the insertion points of an attribute in the block. The associate list is 11 and the variable for the list is ODDINPT.

    (11 22.8125 14.0938 0.0)

    I need to change just the X coordinate, in this case 22.8125, and use a variable which is based on the insertion point of the block itself minus the distance to the insertion point of the attribute. That variable is called XTOODD.

    Then, of course I have to stick this new list back in the variable E300.

    Thanks,
    Doug
     
    d_r_wright, Apr 7, 2004
    #1
  2. d_r_wright

    Jeff Mishler Guest

    (setq E300 (subst XTOODD (cadr E300) E300))

    HTH,
    Jeff

    pairs but I guess it is a little trickier with insertion points which is
    not a dotted pair.
    in a block and contains the insertion points of an attribute in the
    block. The associate list is 11 and the variable for the list is
    ODDINPT.
    a variable which is based on the insertion point of the block itself
    minus the distance to the insertion point of the attribute. That
    variable is called XTOODD.
     
    Jeff Mishler, Apr 7, 2004
    #2
  3. d_r_wright

    d_r_wright Guest

    Jeff,

    I see that I stated the question poorly, so the question of which variables I was talking about was pretty hazy.

    Despite that, I used the syntax of your response and substitued the variables that I needed, some of which I didn't even state in the question.

    Below is the same thing that you wrote with the variables from my program:

    (setq newodd (subst newodip (cadr oldodd) oldodd))

    The long and short of it is that your syntax worked perfectly and now I can finish my program.

    Thanks for your help,
    Doug
     
    d_r_wright, Apr 8, 2004
    #3
  4. d_r_wright

    btlsp Guest

    btlsp, Apr 9, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.