ziele_o2k Posted November 26, 2018 Share Posted November 26, 2018 This solution work form me, but maybe I'm missing something? (vlax-for #item (vla-get-LineTypes (vla-get-ActiveDocument (vlax-get-acad-object))) (if (and (not (wcmatch (strcase (vla-get-name #item)) "BYBLOCK,BYLAYER")) (= (logand (cdr (assoc 70 (entget (vlax-vla-object->ename #item)))) 16) 0) ) (setq line_types_in_drawing (cons (strcase (vla-get-name #item)) line_types_in_drawing)) ) ) Quote Link to comment Share on other sites More sharing options...
Grrr Posted November 26, 2018 Share Posted November 26, 2018 You could iterate with vanilla, without having to reconvert every definition: (while (setq d (tblnext "LTYPE" (not d))) (if (= 0 (logand (cdr (assoc 70 d)) 16)) (setq L (cons (cdr (assoc 2 d)) L)) ) ) (= (length L) (length line_types_in_drawing)) >> T Quote Link to comment Share on other sites More sharing options...
ziele_o2k Posted November 26, 2018 Author Share Posted November 26, 2018 Another? (vlax-for #item (vla-get-LineTypes (vla-get-ActiveDocument (vlax-get-acad-object))) (if (and (snvalid (setq n (strcase (vla-get-name #item)))) (not (wcmatch n "BYBLOCK,BYLAYER")) ) (setq L (cons n L)) ) ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 26, 2018 Share Posted November 26, 2018 The snavalid test is redundant - if the linetype already exists, the name must be valid. Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted November 26, 2018 Share Posted November 26, 2018 (edited) 39 minutes ago, Lee Mac said: The snavalid test is redundant - if the linetype already exists, the name must be valid. The snvalid function is used to check for xref-dependent linetypes. (defun test ( / lst) (vlax-for obj (vla-get-linetypes (vla-get-activedocument (vlax-get-acad-object))) (if (not (wcmatch (strcase (vla-get-name obj)) "*|*,BYBLOCK,BYLAYER")) (setq lst (cons (vla-get-name obj) lst)) ) ) (reverse lst) ) Edited November 26, 2018 by Roy_043 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.