Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/01/2023 in all areas

  1. Here's one possible way - (vl-sort lst '(lambda ( a b ) (< (vl-position (atoi (cadr a)) dsd) (vl-position (atoi (cadr b)) dsd)))) Or, perhaps faster: (mapcar '(lambda ( n ) (nth n lst)) (vl-sort-i (mapcar '(lambda ( x ) (vl-position (atoi (cadr x)) dsd)) lst) '<)) Or, if you only want members that are present in dsd, you could use - (vl-remove nil (mapcar '(lambda ( x ) (car (vl-member-if '(lambda ( y ) (= x (atoi (cadr y)))) lst))) dsd))
    1 point
  2. It is easy to know the angle of a line, but it is difficult to know the angle of a polyline because it has many nodes. I haven't read all of them, but his code has very clear structure, so, It can be applied with very little modifications. approx. 403 line, you have to add "ANGLE" (setq tStr (strcat "{\\C4;" (dxf 0 iLst) "}")) (foreach prop '( ANGLE LAYER COLOR LINETYPE LINEWEIGHT even if put only these 5 characters then test it, the radian angle will appear. and if you want degree, you have to add these 4 lines ( (eq prop 'ANGLE) (vl-princ-to-string (* 180 (/ (vlax-get-property iObj prop) pi))) ) in approx. 450 line, inside of (cond~~) like this (cond ( (eq prop 'COLOR) (_GetColour iLst) ) ( (eq prop 'ANGLE) (vl-princ-to-string (* 180 (/ (vlax-get-property iObj prop) pi))) ) ( (vl-position prop '(DISPLAYLOCKED CLOSED)) (_Stringify (vlax-get-property iObj prop)) )
    1 point
  3. Has anyone come by or developed a lisp routine which will: a: populate a selected area (multishaped) b: at user difined spacings (closed at the end) In a pattern known as Double Meander
    1 point
×
×
  • Create New...