Google Gruppi non supporta più i nuovi post o le nuove iscrizioni Usenet. I contenuti storici continuano a essere visibili.

SelectOnScreen and Filters

487 visualizzazioni
Passa al primo messaggio da leggere

Jacob Dinardi

da leggere,
23 lug 1999, 03:00:0023/07/99
a
I can't seem to get the filter working for the SelectOnScreen method. I get
the error invalid filter data (or something like that). I want to filter
text selections only.

Thanks in advance,
jake

Junichi Yoda

da leggere,
24 lug 1999, 03:00:0024/07/99
a
I hope HP "VB CAD" may be helpfull to you.
http://www.vbcad.com/ssfilter.htm
http://www.vbcad.com/ssfilter_adv.htm

--
----------------------------------------------------
Junichi Yoda
mailto:yo...@be.mbn.or.jp
My Home Page:
http://plaza13.mbn.or.jp/~yoda/AutoCADVBAEnglish
http://www.city.yokosuka.kanagawa.jp/speed/mypage/yoda-j
----------------------------------------------------
Jacob Dinardi <jdin...@jps.net> wrote in message
news:7navhm$fu...@adesknews2.autodesk.com...

Urvan Pourier

da leggere,
26 lug 1999, 03:00:0026/07/99
a
Hi Jacob,

You can use something like this :

Dim Sset as AcadSelectionSet
Dim FilterType(0) as integer
Dim FilterData(0) as variant
Dim TextObject as AcadText

FilterType(0)=0
FilterData(0)="TEXT"

Set Sset=Document.SelectionSets.Add("MySet")

Sset.SelectOnScreen FilterType,FilterData

for each TextObject in Sset

' handle you text objects here...

next

Regards,

Arno van Eeuwen

Jacob Dinardi

da leggere,
26 lug 1999, 03:00:0026/07/99
a
Urvan,
I have already tried what you suggested, and it would not work. It's been
so long since I have done filtering (in LISP) that I started to question
weather "Text" is an acceptable value for the entity name filter (0). I
followed http://www.city.yokosuka.kanagawa.jp/speed/mypage/yoda-j which was
posted by Junichi (Thanks J !) and it appears text is not an acceptable
value for filter 0, but rather has it's own filter (1). Like I said it's
been awhile for me, and I still have not tried this, but I will soon and
post the results.

Thanks again all!
jake
Urvan Pourier wrote in message <379C11C3...@inter.nl.net>...

Thilaknath Rao [Developer Consulting Group, Autodesk]

da leggere,
27 lug 1999, 03:00:0027/07/99
a
Hi Jacob,

Please find a sample code below, which selects only TEXT entities on the
screen.

Sub test()
Dim ss As AcadSelectionSet
Dim f_type(0) As Integer
Dim f_data(0) As Variant
Dim ftype As Variant
Dim fdata As Variant

f_type(0) = 0
f_data(0) = "TEXT"
ftype = f_type
fdata = f_data

Set ss = ThisDrawing.SelectionSets.Add("TST")
ss.SelectOnScreen ftype, fdata
MsgBox ss.count
ss.Delete
End Sub

Hope this helps.

Cheers,
Thilak


Urvan Pourier

da leggere,
27 lug 1999, 03:00:0027/07/99
a
Jacob,

Can you show us some code ?

Arno

Jacob Dinardi

da leggere,
28 lug 1999, 03:00:0028/07/99
a
On second look, my code was not the same. Why must the FilterType and
FilterData be arrays?
I tried this and it didn't work...

Dim MySS as AcadSelectionSet
Dim Ftype as Integer
Dim Fdata
Ftype = 0
Fdata = "Text"

Set MySS = ThisDrawing.SelectionSets.Add("Get_Text")
MySS.SelectOnScreen Ftype, Fdata

I will try again using the code supplied to me here.

Thanks again,
jake

Urvan Pourier wrote in message <379DBFA4...@inter.nl.net>...

Jacob Dinardi

da leggere,
29 lug 1999, 03:00:0029/07/99
a
I don't know what the problem is, but it still won't work. I've tried other
objects than text aswell and I keep getting the error "Invalid input in
filter data". What am I missing here?

jake

Jacob Dinardi wrote in message <7no44b$2s...@adesknews2.autodesk.com>...

Thilaknath Rao [Developer Consulting Group, Autodesk]

da leggere,
30 lug 1999, 03:00:0030/07/99
a
Try the sample code that i have posted and let me know.

Thilak


Jacob Dinardi wrote in message <7nqn3f$6e...@adesknews2.autodesk.com>...

Jacob Dinardi

da leggere,
30 lug 1999, 03:00:0030/07/99
a
Thilak
I tried your code as well, and it still does not work. This seems really
simple I don't know what the problem is.

jake
Thilaknath Rao [Developer Consulting Group, Autodesk] wrote in message
<7nra1i$70...@adesknews2.autodesk.com>...

dungluu...@gmail.com

da leggere,
24 mar 2014, 10:24:4324/03/14
a
On Friday, July 23, 1999 2:00:00 PM UTC+7, Jacob Dinardi wrote:
> I can't seem to get the filter working for the SelectOnScreen method. I get
> the error invalid filter data (or something like that). I want to filter
> text selections only.
>
> Thanks in advance,
> jake

hi jake, this my ex code,you can try it

Sub chon_doi_tuong()
'lap tap doi tuong
Dim ss As AcadSelectionSet
On Error Resume Next
Set ss = ThisDrawing.SelectionSets("myss")
If Err <> 0 Then
Err.Clear
Set ss = ThisDrawing.SelectionSets.Add("myss")
Else
ss.Clear
End If

'them doi tuong
Dim t(0) As Integer
Dim d(0) As Variant
Dim i As AcadText
Dim a As Integer
Dim b, c As String
t(0) = 0
d(0) = "TEXT"
ss.SelectOnScreen t, d
a = 0
For Each i In ss
c = i.TextString
b = Left(c, 1)
If b = "v" Then
a = a + 1
End If
Next
MsgBox "So phan tu bat dau bang ki tu V la " & a
End Sub
0 nuovi messaggi