|
|
problem about text & it's insertion point |
|
Author |
Message |
charvey

|
Posted: Thu Sep 23 23:52:18 CDT 2004 |
Top |
Visual Basic >> problem about text & it's insertion point
hola
i got a code that selects the object in a acadfile then filters the "text"
objects. then i want to find out the insertion point of this text objects.
acadtext.insertionpoint is fine when u create a new text by using a code
that creates actext.
when i filter the same objects with "actext" i got nothing. i thought it has
to be the same with "text".
Sub exportdata()
Dim sset As AcadSelectionSet
Dim filtertype(0) As Integer
Dim filtervalue(0) As Variant
Dim yazi As String
Dim boy() As String
Dim nokta As Variant
On Error Resume Next
ThisDrawing.SelectionSets.Item("data").Delete
Set sset = ThisDrawing.SelectionSets.Add("data")
filtertype(0) = 0
filtervalue(0) = "text"
sset.SelectOnScreen filtertype, filtervalue
say = sset.Count
For i = 1 To say - 1
yazi = sset.Item(i).TextString
boy = Split(yazi, , , vbTextCompare)
nokta = sset.Item(i).InsertionPoint
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Next i
End Sub
when i try to print.debug nokta(i) i get nothing.
where is the mistake?
anyone can help
thnx.
Visual Studio145
|
|
|
|
 |
Gerald

|
Posted: Thu Sep 23 23:52:18 CDT 2004 |
Top |
Visual Basic >> problem about text & it's insertion point
Been a long time since I used VBA for Acad. Abandoned Acad in favor of
Microstation long ago ;-)
Odds are you might not get an answer here.
While you may or may not be using VB6 for this, you are really working with
the VBA implementation in Acad. Your best bet is to look at the VBA docs
included with Acad and/or consult an Acad newsgroup.
Due to my failing memory, I'm not certain exactly where things are going
wrong, but I can see a few things in your code that don't quite look right.
Read the docs again.
Gerald
> hola
>
> i got a code that selects the object in a acadfile then filters the "text"
> objects. then i want to find out the insertion point of this text objects.
>
> acadtext.insertionpoint is fine when u create a new text by using a code
> that creates actext.
>
> when i filter the same objects with "actext" i got nothing. i thought it
has
> to be the same with "text".
>
>
> Sub exportdata()
>
> Dim sset As AcadSelectionSet
> Dim filtertype(0) As Integer
> Dim filtervalue(0) As Variant
> Dim yazi As String
> Dim boy() As String
> Dim nokta As Variant
>
>
>
> On Error Resume Next
> ThisDrawing.SelectionSets.Item("data").Delete
> Set sset = ThisDrawing.SelectionSets.Add("data")
>
> filtertype(0) = 0
> filtervalue(0) = "text"
> sset.SelectOnScreen filtertype, filtervalue
> say = sset.Count
> For i = 1 To say - 1
> yazi = sset.Item(i).TextString
> boy = Split(yazi, , , vbTextCompare)
> nokta = sset.Item(i).InsertionPoint
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> Next i
>
> End Sub
>
> when i try to print.debug nokta(i) i get nothing.
>
> where is the mistake?
>
> anyone can help
>
> thnx.
>
>
|
|
|
|
 |
|
|