Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/31/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. Yes - if using variable data, you'll need to construct the ssget filter list using list/cons as opposed to using a quoted literal list - I explain this in more detail in my tutorial here. Note that, if using dynamic blocks, you may also need to include anonymous block references in the initial selection, and then test the effective name of each acquired block reference, removing those which do not match the effective name of the target block.
    1 point
×
×
  • Create New...