Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/17/2020 in all areas

  1. You can go deeper in a sort than X Y eg block-name X Y Z att1 att2
    1 point
  2. 1st question is why ? Think this has been done before.
    1 point
  3. About to say the rounding down is a problem you would need a If answer < original add 2 * rounding. Still think 5 is way to much a different way may be to look at decimal if > 0.1 then add 1 to integer value. This way set a minimum value like 0.1 that can be dropped. I have personally tape measured meters of kerbing as there was a dispute about lengths. You don't want to over pay the contractor. 5's will add very quick extra in their pocket.
    1 point
  4. My LM:roundm function may be used in the following way: _$ (LM:roundm 12 5) 10 _$ (LM:roundm 13 5) 15 You can implement the same logic in field formatting using the ROUND formula function, by changing this: (strcat "%<\\AcObjProp Object(%<\\_ObjId " (LM:objectid (vlax-ename->vla-object ent)) ">%)." (cond ( (= "CIRCLE" typ) "Circumference") ( (= "ARC" typ) "ArcLength") ( "Length" ) ) " \\f \"" fmt "\">%" ) To: (strcat "%<\\AcExpr (ROUND(%<\\AcObjProp Object(%<\\_ObjId " (LM:objectid (vlax-ename->vla-object ent)) ">%)." (cond ( (= "CIRCLE" typ) "Circumference") ( (= "ARC" typ) "ArcLength") ( "Length" ) ) ">%/5.0)*5.0) \\f \"" fmt "\">%" )
    1 point
  5. Try (setq lst (vl-sort lst '(lambda (x y) (if (= (car x) (car y)) (< (cadr x) (cadr y)) (< (car x) (car y)))))) where lst is the list you wish to sort This returns as per your post, however this is not left->right top->bottom but left->right bottom->top If you want top->bottom (setq s_lst (vl-sort lst '(lambda (x y) (if (= (car x) (car y)) (> (cadr x) (cadr y)) (< (car x) (car y)))))) should work
    1 point
×
×
  • Create New...