Maybe theese can help.
Marco
; Function: ALE_List_MemberWcMatch
;
; Version 1.00 - 05/12/2006
;
; Description:
; Searches a list for an occurrence of wcmatch and returns the remainder
; of the list, starting with the first occurrence of the expression
;
; Arguments:
; WcMStr = Wcmatch string [STR]
; ex.: "Line,*Polyline,Arc,Circle,Ellipse,Spline"
; In_Lst: the list of strings in which to search for wcmatch
;
; Return Values:
; A list, otherwise nil, if there is no wcmatch occurrence in lst.
;
; Example:
; (ALE_List_MemberWcMatch
; "*rc*" '("Line" "Polyline" "Arc" "Circle" "Ellipse" "Spline")
; )
; =>("Arc" "Circle" "Ellipse" "Spline")
;
(defun ALE_List_MemberWcMatch (WcmStr In_Lst)
(vl-member-if
'(lambda (LmbDat) (wcmatch LmbDat WcmStr))
In_Lst
)
)
; Function: ALE_List_RemoveIfCarNotWcMatch
;
; Version 1.00 - 05/12/2006
;
; Description:
; Returns all elements of the supplied list that Wcmatch WcMStr
;
; Arguments:
; WcMStr = Wcmatch string [STR]
; ex.: "Line,*Polyline,Arc,Circle,Ellipse,Spline"
; In_Lst: the list of lists of strings in which to search for wcmatch
;
; Return Values: A list
;
; Example:
; (ALE_List_RemoveIfCarNotWcMatch
; "*rc*"
; '(("Line" 1000 1.0)("Polyline" 1005 4.0)("Arc" 1002 3.0)("Circle" 1001
7.0)("Ellipse" 1011 1.1)("Spline" 1013 1.3))
; )
; =>("Arc" "Circle")
;
(defun ALE_List_RemoveIfCarNotWcMatch (WcmStr In_Lst)
(vl-remove-if-not
'(lambda (LmbDat) (wcmatch (car LmbDat) WcmStr))
In_Lst
)
)
; Function: ALE_List_RemoveIfNotWcMatch
;
; Version 1.00 - 05/12/2006
;
; Description:
; Returns all elements of the supplied list that Wcmatch WcMStr
;
; Arguments:
; WcMStr = Wcmatch string [STR]
; ex.: "Line,*Polyline,Arc,Circle,Ellipse,Spline"
; In_Lst: the list of strings in which to search for wcmatch
;
; Return Values: A list
;
; Example:
; (ALE_List_RemoveIfNotWcMatch
; "*rc*" '("Line" "Polyline" "Arc" "Circle" "Ellipse" "Spline")
; )
; =>("Arc" "Circle")
;
(defun ALE_List_RemoveIfNotWcMatch (WcmStr In_Lst)
(vl-remove-if-not
'(lambda (LmbDat) (wcmatch LmbDat WcmStr))
In_Lst
)
)
{code}
"andrew.nao"
ha scritto nel messaggio
news:6306459@discussion.autodesk.com...
I know wcmatch is for use with st...