Hello,
A very small script I did just now for a French user. It allow to select polylines, depending if they are open or closed.
Select the drawing object, then run the script and choice an option. Other objects than polylines/polyrectangles are ignored.
' select open or closed polylines
' dh42 03/2015
sub main
'ask for open/closed
dim rep as string
dim p as polyline
rep = inputbox("1 - Select open polylines" & vbnewline & "2 - Select closed polylines",, 1)
if rep <> 1 and rep <> 2 then exit sub
dim newselection as ArrayList = new ArrayList()
if view.SelectedEntities.Length > 0 then
for each ent as Entity in view.SelectedEntities
if typeof ent is Polyline
p = ent
select case rep
case 1 'ouvertes
if p.closed = false then
newselection.add(ent)
end if
case 2 'fermées
if p.closed = true then
newselection.add(ent)
end if
end select
end if
next ent
view.Select(newselection)
view.RefreshView()
end if
end sub
++
David