Article View: pl.comp.cad
Article #53084Re: qselect z wiersza poleceń?
From: jureko
Date: Sat, 29 Aug 2009 06:26
Date: Sat, 29 Aug 2009 06:26
58 lines
2796 bytes
2796 bytes
On 28 Sie, 11:15, "Lagoda" <niespamowac lagoda malpa list kropka pl>
wrote:
> > (ssget "X" '((0 . "TEXT")(8 . "BEZ_TEILE")(62 . 4)))
> > zaznacza wszystkie teksty z warstwy 'BEZ_TEILE' o kolorze '4' - cyan.
>
> Czy da się to jakoś wywołać wpisując w treść makra, czy trzeba zrobić lispa?
> Próbowalem w makro ale nie działa (choć chyba powinno, bo zmieniłem tylko
> nazwę warstwy i kolor).
> pojawia się napis: <Selection set: 4977>
W vba w zwcadzie robię tak:
Sub totalnumber()
'define
Dim total As Double
total = 0
'Create a set
Dim ssetObj As ZwcadSelectionSet
Set ssetObj = ThisDocument.SelectionSets.Add("TEST_SSET")
'use Filters to get text
Dim Ftype(2) As Integer
Dim Fdata(2) As Variant
Ftype(0) = 0
Fdata(0) = "text"
Ftype(1) = 8
Fdata(1) = "teksty"
Ftype(2) = 62
Fdata(2) = 4
Dim mode As ZcSelectionSetType
mode = zcSelectionSetAll
ssetObj.Select zcSelectionSetAll, , , Ftype, Fdata
'Determine the text whether to be digital
For i = 0 To ssetObj.Count - 1
If IsNumeric(ssetObj.Item(i).TextString) Then
total = total + ssetObj.Item(i).TextString
ActiveDocument.Utility.Prompt ssetObj.Item(i).TextString &
vbCrLf
End If
Next i
' delete set
ssetObj.Delete
' output the sum
ActiveDocument.Utility.Prompt "suma " & total
End Sub
Do acada można to chyba dopasować, zresztą w helpie pewnie będzie
przykład.
Technical Details
Message-ID:
<4dd507c1-17c3-4464-a287-7590b1ec617a@q35g2000vbi.googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!news.nask.pl!news.nask.org.pl!goblin1!goblin.stu.neva.ru!postnews.google.com!q35g2000vbi.googlegroups.com!not-for-mailReferences:
<4a96996f$1@news.home.net.pl> <ecb4bd97-106a-4c81-a2f2-babbf94518bf@t13g2000yqt.googlegroups.com> <4a97a02a$1@news.home.net.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!news.nask.pl!news.nask.org.pl!goblin1!goblin.stu.neva.ru!postnews.google.com!q35g2000vbi.googlegroups.com!not-for-mail From: jureko <jerys1@gmail.com> Newsgroups: pl.comp.cad Subject: Re: qselect z wiersza poleceń? Date: Fri, 28 Aug 2009 23:26:04 -0700 (PDT) Organization: http://groups.google.com Lines: 60 Message-ID: <4dd507c1-17c3-4464-a287-7590b1ec617a@q35g2000vbi.googlegroups.com> References: <4a96996f$1@news.home.net.pl> <ecb4bd97-106a-4c81-a2f2-babbf94518bf@t13g2000yqt.googlegroups.com> <4a97a02a$1@news.home.net.pl> NNTP-Posting-Host: 195.78.238.130 Mime-Version: 1.0 X-Trace: posting.google.com 1251527164 1902 127.0.0.1 (29 Aug 2009 06:26:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 29 Aug 2009 06:26:04 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q35g2000vbi.googlegroups.com; posting-host=195.78.238.130; posting-account=QhAZpQoAAACB0H1EDBQ9zfhG0v-d1U9M User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2,gzip(gfe),gzip(gfe) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit