CAD Forums > Land Lubber / Geographically Positioned

Can you Filter Featurelines by names?

(1/2) > >>

MSTG007:
I have been playing around with the arc connector and importing GIS information into a drawing by using feature lines. However, it does not place them on a layer. I was wondering if there is a way to filter feature lines by name and place it on layer.

But, I don't think I can select it.

Thanks for any input.

Jeff_M:
You can use Qselect, Featureline, by property Name, using Wildcard match,

MSTG007:
Thanks Jeff for showing me that. That does help! The last question I have; is there a way to use this in a lisp type file?

Jeff_M:
This does, through lisp, what the Qselect does:

--- Code - Auto/Visual Lisp: ---(defun featurelines_by_name (name / ss idx ent fl newss)  (if (setq ss (ssget '((0 . "AECC_FEATURE_LINE"))))    (progn      (setq newss (ssadd)            idx -1)      (while (setq ent (ssname ss (setq idx (1+ idx))))        (setq fl (vlax-ename->vla-object ent))        (if (wcmatch (vlax-get fl "name") name)          (ssadd ent newss)          )        )      )    )  (sssetfirst nil newss)  newss  )
You would use it like so to find all featurelines with a name ending with "2":
(featurelines_by_name "*2")

Jeff_M:
I should note that it sets the Pickfirst selection set to the desired featurelines and returns that ss for use in the calling code if needed.

Navigation

[0] Message Index

[#] Next page

Go to full version