Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/30/2022 in all areas

  1. My code has no "c" just like the first one. You mean to say that if I want to use Center option I have to write a new code? Like the one you created. Now I know, I have to be very specific when writing a code. Once again thank you very much for your time answering my question. I really appreciate your time and effort answering a question from a newbie. God bless you and God will repay you a million fold for your kindness and generosity.
    1 point
  2. Thanks Steven for your input. I'll keep that in mind.
    1 point
  3. @mhupp Thanks for the answer!! It will take me some time to learn this code, but there is one fundemental issue that i'm trying to figure out for some time: this type of code - (setq blk (cdr (assoc 2 (entget e)))) "e" is set to a block entity,and that block entity do have a list of arguments,that is clear. cdr means "get the second item on that arguments list (or just any list..)". in the dxf-reference_enu, both in the BLOCKS Section (Chapter 5 BLOCKS Section) and the insert section (Chapter 6 ENTITIES Section) the block name is indeed assoc code 2 (I've attached a screenshot from the dxf manual),so that is also clear to me why the use of assoc 2. so why the use of cdr? 1. what is the logic Behind this, and why it is wrong to write "(setq blk (assoc 2 (entget e)))? 2. why do we need the entget when e is already set to a block object,which means that it an entity from the beginning? thanks for patience... Ari.
    1 point
  4. The arc command requires 3 inputs for the start, 2nd and end point, so you need 3 pauses. Try the code below. (defun c:test() (command "arc" pause pause pause) (setq ent (entlast)) (setvar "PEDITACCEPT" 1) (command "PEDIT" ent "W" 20 "") (setvar "PEDITACCEPT" 0) (princ) )
    1 point
×
×
  • Create New...