Jump to content

Recommended Posts

Posted

Hello everybody.

Considering PSTYLEMODE=0 (use of named plot style tables), how to select with AutoLISP all entities in current working space based on PlotStyleName criteria?

 

Thank you in advance.

Posted

Look into DXF 380 and 390 group codes...

Posted

@marko_ribar

Thank you for your answer.

Here below are the results.

;;1
(vla-get-plotstylename(vlax-ename->vla-object(entlast)))
;;Return "Style_1"

;;2
(cdr (assoc 380 (entget (entlast))))
;;Return nil

;;3
(cdr (assoc 390 (entget (entlast))))
;;Return <ENTITY NAME: 2a253790>
;;???

 

Posted
(defun c:selnamedpstyle-Style_1 ( / dict stename ss )
  (setq dict (dictsearch (namedobjdict) "ACAD_PLOTSTYLENAME"))
  (setq stename (cdr (assoc 350 (member '(3 . "Style_1") dict))))
  (setq ss (ssget "_X" (list (cons 390 stename) (cons 410 (getvar 'ctab)))))
  (sssetfirst nil ss)
  (princ)
)

HTH., M.R.

  • Thanks 1

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...