select filter by xdata regappname does not always work

select filter by xdata regappname does not always work

Anonymous
Not applicable
1,639 Views
18 Replies
Message 1 of 19

select filter by xdata regappname does not always work

Anonymous
Not applicable
Dear Forum Users;

I've been working with .NET and the AutoCAD API for a while now,
but here's something I really don't get.


I've added an entity to a drawing, that contains the following XData (each line represents a new TypedValue):
type: 1001, value: 200903021622150430002
type: 1002, value: {
type: 1000, value: Somestring
type: 1002, value: }

The value displayed in the first xdata-line is a RegAppName which I have added as a RegAppTableRecord to the RegAppTable.


My drawing is full of entities, but I'd like to find exáctly this entity.
I do this by creating a selection filter and calling the selectAll method on the Autodesk.Autocad.EditorInput.Editor-object.
See the sample code below

{code}

'variable ID is of string value "200903021622150430002"

Dim ent As Entity = nothing
Dim filter As TypedValue() = {New TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
Dim selfilter As New SelectionFilter(filter)
Dim pres As PromptSelectionResult = ed.SelectAll(selfilter)
If Not pres.Value Is Nothing Then
Dim idarray As ObjectId() = pres.Value.GetObjectIds()
If idarray.Length > 0 Then
Using tr As Transaction = db.TransactionManager.StartTransaction
Try
ent = DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch ex As System.Exception
Debug.WriteLine(ex.Message)
End Try
End Using
End If
End If

{code}

The Problem;
This method does not álways seem to work.
In most cases, the entity i am looking for will be found and retrieved by from the Database.
However, sometimes PromptSectionResult.Value is just Nothing.
What could be the possible cause of (and solution to) this?


i already tried recovering the drawing, thus no errors might exist in the drawing i guess¿


Also, adding a typedvalue that contains DxfCode.XDataSTart does not make a difference:
Dim filter As TypedValue() = {New TypedValue(DxfCode.XDataStart), New TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
1,640 Views
18 Replies
Replies (18)
Message 2 of 19

Anonymous
Not applicable


 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Dear
Forum Users; I've been working with .NET and the AutoCAD API for a while now,
but here's something I really don't get. I've added an entity to a drawing,
that contains the following XData (each line represents a new TypedValue):
type: 1001, value: 200903021622150430002 type: 1002, value: { type: 1000,
value: Somestring type: 1002, value: } The value displayed in the first
xdata-line is a RegAppName which I have added as a RegAppTableRecord to the
RegAppTable. My drawing is full of entities, but I'd like to find exáctly this
entity. I do this by creating a selection filter and calling the selectAll
method on the Autodesk.Autocad.EditorInput.Editor-object. See the sample code
below {code} 'variable ID is of string value "200903021622150430002" Dim ent
As Entity = nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity) Catch ex
As System.Exception Debug.WriteLine(ex.Message) End Try End Using End If End
If {code} The Problem; This method does not álways seem to work. In most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing. What
could be the possible cause of (and solution to) this? i already tried
recovering the drawing, thus no errors might exist in the drawing i guess¿
Also, adding a typedvalue that contains DxfCode.XDataSTart does not make a
difference: Dim filter As TypedValue() = {New TypedValue(DxfCode.XDataStart),
New TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 3 of 19

Anonymous
Not applicable
If one is using a newsreader, that doesn't help, and code tags
or not, the entire message content is word-wrapped.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Kerry Brown" wrote in message
news:[email protected]...
http://discussion.autodesk.com/forums/ann.jspa?annID=125

"plamp" wrote in message news:[email protected]...
Dear Forum Users; I've been working with .NET and the AutoCAD API for a
while now, but here's something I really don't get. I've added an entity to
a drawing, that contains the following XData (each line represents a new
TypedValue): type: 1001, value: 200903021622150430002 type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value displayed in
the first xdata-line is a RegAppName which I have added as a
RegAppTableRecord to the RegAppTable. My drawing is full of entities, but
I'd like to find exáctly this entity. I do this by creating a selection
filter and calling the selectAll method on the
Autodesk.Autocad.EditorInput.Editor-object. See the sample code below {code}
'variable ID is of string value "200903021622150430002" Dim ent As Entity =
nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity) Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End If
End If {code} The Problem; This method does not álways seem to work. In most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing. What
could be the possible cause of (and solution to) this? i already
tried recovering the drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not
make a difference: Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 4 of 19

Anonymous
Not applicable

This is a test in Rich Text format.

 

 

Option Explicit

 

Private Const MAX_COMPUTERNAME_LENGTH As Long =
31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As
Long

 

Private Sub Form_Load()
Dim dwLen As Long
Dim
strString As String
   
  'Create a buffer
 
dwLen = MAX_COMPUTERNAME_LENGTH + 1
  strString = String(dwLen,
"X")
  'Get the computer name
  GetComputerName strString,
dwLen
  'get only the actual data
  strString = Left(strString,
dwLen)
  'Show the computer name
  Label1.Caption =
strString
End Sub

 

Joe ...

 

 

If one is using a
newsreader, that doesn't help, and code tags
or not, the entire message
content is word-wrapped.

--

href="http://www.caddzone.com">
size=2>http://www.caddzone.com



size=2>AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000
through 2009


size=2>http://www.acadxtabs.com



size=2>Introducing AcadXTabs 2010:

href="http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm">
size=2>http://www.caddzone.com/acadxtab...




face=Arial size=2>"Kerry Brown" <

face=Arial size=2>kwb@home
> wrote in
message

face=Arial size=2>news:[email protected]

face=Arial size=2>...

href="http://discussion.autodesk.com/forums/ann.jspa?annID=125">
size=2>http://discussion.autodesk....



face=Arial size=2>  "plamp" wrote in message

href="news:[email protected]">
size=2>news:[email protected]

size=2>...
  Dear Forum Users; I've been working with .NET and the
AutoCAD API for a
while now, but here's something I really don't get. I've
added an entity to
a drawing, that contains the following XData (each line
represents a new
TypedValue): type: 1001, value: 200903021622150430002 type:
1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value
displayed in
the first xdata-line is a RegAppName which I have added as a

RegAppTableRecord to the RegAppTable. My drawing is full of entities, but

I'd like to find exáctly this entity. I do this by creating a selection

filter and calling the selectAll method on the

Autodesk.Autocad.EditorInput.Editor-object. See the sample code below {code}

'variable ID is of string value "200903021622150430002" Dim ent As Entity =

nothing Dim filter As TypedValue() = {New

TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New

SelectionFilter(filter) Dim pres As PromptSelectionResult =

ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As

ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using
tr
As Transaction = db.TransactionManager.StartTransaction Try ent =

DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity) Catch

ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End If

End If {code} The Problem; This method does not álways seem to work. In most

cases, the entity i am looking for will be found and retrieved by from the

Database. However, sometimes PromptSectionResult.Value is just Nothing. What

could be the possible cause of (and solution to) this? i already

tried recovering the drawing, thus no errors might exist in the drawing i

guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not

make a difference: Dim filter As TypedValue() = {New

TypedValue(DxfCode.XDataStart), New

TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 5 of 19

Anonymous
Not applicable

Oh, and I use Outlook Express ...

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">


This is a test in Rich Text format.

 

 

Option Explicit

 

Private Const MAX_COMPUTERNAME_LENGTH As Long =
31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As
Long

 

Private Sub Form_Load()
Dim dwLen As
Long
Dim strString As String
   
  'Create a
buffer
  dwLen = MAX_COMPUTERNAME_LENGTH + 1
  strString =
String(dwLen, "X")
  'Get the computer name
  GetComputerName
strString, dwLen
  'get only the actual data
  strString =
Left(strString, dwLen)
  'Show the computer name
 
Label1.Caption = strString
End Sub

 

Joe ...

 

 

If one is using a
newsreader, that doesn't help, and code tags
or not, the entire message
content is word-wrapped.

--

href="http://www.caddzone.com">
size=2>http://www.caddzone.com



size=2>AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD
2000 through 2009


face=Arial size=2>http://www.acadxtabs.com



size=2>Introducing AcadXTabs 2010:

href="http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm">
size=2>http://www.caddzone.com/acad...




face=Arial size=2>"Kerry Brown" <

face=Arial size=2>kwb@home
> wrote in
message

face=Arial size=2>news:[email protected]

face=Arial size=2>...

href="http://discussion.autodesk.com/forums/ann.jspa?annID=125">
face=Arial
size=2>http://di...



face=Arial size=2>  "plamp" wrote in message

href="news:[email protected]">
size=2>news:[email protected]

size=2>...
  Dear Forum Users; I've been working with .NET and the
AutoCAD API for a
while now, but here's something I really don't get. I've
added an entity to
a drawing, that contains the following XData (each line
represents a new
TypedValue): type: 1001, value: 200903021622150430002
type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: }
The value displayed in
the first xdata-line is a RegAppName which I have
added as a
RegAppTableRecord to the RegAppTable. My drawing is full of
entities, but
I'd like to find exáctly this entity. I do this by creating
a selection
filter and calling the selectAll method on the

Autodesk.Autocad.EditorInput.Editor-object. See the sample code below
{code}
'variable ID is of string value "200903021622150430002" Dim ent As
Entity =
nothing Dim filter As TypedValue() = {New

TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New

SelectionFilter(filter) Dim pres As PromptSelectionResult =

ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As

ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using
tr
As Transaction = db.TransactionManager.StartTransaction Try ent =

DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using
End If
End If {code} The Problem; This method does not álways seem to
work. In most
cases, the entity i am looking for will be found and
retrieved by from the
Database. However, sometimes
PromptSectionResult.Value is just Nothing. What
could be the possible
cause of (and solution to) this? i already
tried recovering the
drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a
typedvalue that contains DxfCode.XDataSTart does not
make a difference:
Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New

TypedValue(DxfCode.ExtendedDataRegAppName, ID)}

0 Likes
Message 6 of 19

Anonymous
Not applicable
That's nice Steve.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Oh, and I use Outlook Express ...

"Joe Sutphin" wrote in message
news:[email protected]...
This is a test in Rich Text format.


Option Explicit

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String

'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
Label1.Caption = strString
End Sub

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
If one is using a newsreader, that doesn't help, and code tags
or not, the entire message content is word-wrapped.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Kerry Brown" wrote in message
news:[email protected]...
http://discussion.autodesk.com/forums/ann.jspa?annID=125

"plamp" wrote in message news:[email protected]...
Dear Forum Users; I've been working with .NET and the AutoCAD API for a
while now, but here's something I really don't get. I've added an entity
to
a drawing, that contains the following XData (each line represents a new
TypedValue): type: 1001, value: 200903021622150430002 type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value displayed in
the first xdata-line is a RegAppName which I have added as a
RegAppTableRecord to the RegAppTable. My drawing is full of entities, but
I'd like to find exáctly this entity. I do this by creating a selection
filter and calling the selectAll method on the
Autodesk.Autocad.EditorInput.Editor-object. See the sample code below
{code}
'variable ID is of string value "200903021622150430002" Dim ent As Entity
=
nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End
If
End If {code} The Problem; This method does not álways seem to work. In
most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing.
What
could be the possible cause of (and solution to) this? i already
tried recovering the drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not
make a difference: Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 7 of 19

Anonymous
Not applicable
Now who's the doorknob?

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
That's nice Steve.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Oh, and I use Outlook Express ...

"Joe Sutphin" wrote in message
news:[email protected]...
This is a test in Rich Text format.


Option Explicit

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String

'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
Label1.Caption = strString
End Sub

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
If one is using a newsreader, that doesn't help, and code tags
or not, the entire message content is word-wrapped.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Kerry Brown" wrote in message
news:[email protected]...
http://discussion.autodesk.com/forums/ann.jspa?annID=125

"plamp" wrote in message news:[email protected]...
Dear Forum Users; I've been working with .NET and the AutoCAD API for a
while now, but here's something I really don't get. I've added an entity
to
a drawing, that contains the following XData (each line represents a new
TypedValue): type: 1001, value: 200903021622150430002 type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value displayed in
the first xdata-line is a RegAppName which I have added as a
RegAppTableRecord to the RegAppTable. My drawing is full of entities, but
I'd like to find exáctly this entity. I do this by creating a selection
filter and calling the selectAll method on the
Autodesk.Autocad.EditorInput.Editor-object. See the sample code below
{code}
'variable ID is of string value "200903021622150430002" Dim ent As Entity
=
nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End
If
End If {code} The Problem; This method does not álways seem to work. In
most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing.
What
could be the possible cause of (and solution to) this? i already
tried recovering the drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not
make a difference: Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 8 of 19

Anonymous
Not applicable
Steve - you will always be the doorknob here.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Now who's the doorknob?

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
That's nice Steve.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Oh, and I use Outlook Express ...

"Joe Sutphin" wrote in message
news:[email protected]...
This is a test in Rich Text format.


Option Explicit

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String

'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
Label1.Caption = strString
End Sub

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
If one is using a newsreader, that doesn't help, and code tags
or not, the entire message content is word-wrapped.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Kerry Brown" wrote in message
news:[email protected]...
http://discussion.autodesk.com/forums/ann.jspa?annID=125

"plamp" wrote in message news:[email protected]...
Dear Forum Users; I've been working with .NET and the AutoCAD API for a
while now, but here's something I really don't get. I've added an entity
to
a drawing, that contains the following XData (each line represents a new
TypedValue): type: 1001, value: 200903021622150430002 type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value displayed in
the first xdata-line is a RegAppName which I have added as a
RegAppTableRecord to the RegAppTable. My drawing is full of entities, but
I'd like to find exáctly this entity. I do this by creating a selection
filter and calling the selectAll method on the
Autodesk.Autocad.EditorInput.Editor-object. See the sample code below
{code}
'variable ID is of string value "200903021622150430002" Dim ent As Entity
=
nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End
If
End If {code} The Problem; This method does not álways seem to work. In
most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing.
What
could be the possible cause of (and solution to) this? i already
tried recovering the drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not
make a difference: Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 9 of 19

Anonymous
Not applicable
Nope, sorry, you're mistaken again.

You were and will always be the doorknob.

I was just curious if you had realized it yet, but I see you haven't.

And stop calling me Steve, whoever that is!

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - you will always be the doorknob here.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Now who's the doorknob?

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
That's nice Steve.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Oh, and I use Outlook Express ...

"Joe Sutphin" wrote in message
news:[email protected]...
This is a test in Rich Text format.


Option Explicit

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String

'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
Label1.Caption = strString
End Sub

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
If one is using a newsreader, that doesn't help, and code tags
or not, the entire message content is word-wrapped.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Kerry Brown" wrote in message
news:[email protected]...
http://discussion.autodesk.com/forums/ann.jspa?annID=125

"plamp" wrote in message news:[email protected]...
Dear Forum Users; I've been working with .NET and the AutoCAD API for a
while now, but here's something I really don't get. I've added an entity
to
a drawing, that contains the following XData (each line represents a new
TypedValue): type: 1001, value: 200903021622150430002 type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value displayed in
the first xdata-line is a RegAppName which I have added as a
RegAppTableRecord to the RegAppTable. My drawing is full of entities, but
I'd like to find exáctly this entity. I do this by creating a selection
filter and calling the selectAll method on the
Autodesk.Autocad.EditorInput.Editor-object. See the sample code below
{code}
'variable ID is of string value "200903021622150430002" Dim ent As Entity
=
nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End
If
End If {code} The Problem; This method does not álways seem to work. In
most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing.
What
could be the possible cause of (and solution to) this? i already
tried recovering the drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not
make a difference: Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 10 of 19

Anonymous
Not applicable
Steve - Everyone that reads this newsgroup already
knows who the resident bottom-feeder is.

There's no need to point the finger .

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Nope, sorry, you're mistaken again.

You were and will always be the doorknob.

I was just curious if you had realized it yet, but I see you haven't.

And stop calling me Steve, whoever that is!

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - you will always be the doorknob here.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Now who's the doorknob?

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
That's nice Steve.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Oh, and I use Outlook Express ...

"Joe Sutphin" wrote in message
news:[email protected]...
This is a test in Rich Text format.


Option Explicit

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String

'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
Label1.Caption = strString
End Sub

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
If one is using a newsreader, that doesn't help, and code tags
or not, the entire message content is word-wrapped.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Kerry Brown" wrote in message
news:[email protected]...
http://discussion.autodesk.com/forums/ann.jspa?annID=125

"plamp" wrote in message news:[email protected]...
Dear Forum Users; I've been working with .NET and the AutoCAD API for a
while now, but here's something I really don't get. I've added an entity
to
a drawing, that contains the following XData (each line represents a new
TypedValue): type: 1001, value: 200903021622150430002 type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value displayed in
the first xdata-line is a RegAppName which I have added as a
RegAppTableRecord to the RegAppTable. My drawing is full of entities, but
I'd like to find exáctly this entity. I do this by creating a selection
filter and calling the selectAll method on the
Autodesk.Autocad.EditorInput.Editor-object. See the sample code below
{code}
'variable ID is of string value "200903021622150430002" Dim ent As Entity
=
nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End
If
End If {code} The Problem; This method does not álways seem to work. In
most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing.
What
could be the possible cause of (and solution to) this? i already
tried recovering the drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not
make a difference: Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 11 of 19

Anonymous
Not applicable
So stop pointing it at yourself.

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - Everyone that reads this newsgroup already
knows who the resident bottom-feeder is.

There's no need to point the finger .

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Nope, sorry, you're mistaken again.

You were and will always be the doorknob.

I was just curious if you had realized it yet, but I see you haven't.

And stop calling me Steve, whoever that is!

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - you will always be the doorknob here.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Now who's the doorknob?

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
That's nice Steve.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Oh, and I use Outlook Express ...

"Joe Sutphin" wrote in message
news:[email protected]...
This is a test in Rich Text format.


Option Explicit

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String

'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
Label1.Caption = strString
End Sub

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
If one is using a newsreader, that doesn't help, and code tags
or not, the entire message content is word-wrapped.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Kerry Brown" wrote in message
news:[email protected]...
http://discussion.autodesk.com/forums/ann.jspa?annID=125

"plamp" wrote in message news:[email protected]...
Dear Forum Users; I've been working with .NET and the AutoCAD API for a
while now, but here's something I really don't get. I've added an entity
to
a drawing, that contains the following XData (each line represents a new
TypedValue): type: 1001, value: 200903021622150430002 type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value displayed in
the first xdata-line is a RegAppName which I have added as a
RegAppTableRecord to the RegAppTable. My drawing is full of entities, but
I'd like to find exáctly this entity. I do this by creating a selection
filter and calling the selectAll method on the
Autodesk.Autocad.EditorInput.Editor-object. See the sample code below
{code}
'variable ID is of string value "200903021622150430002" Dim ent As Entity
=
nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End
If
End If {code} The Problem; This method does not álways seem to work. In
most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing.
What
could be the possible cause of (and solution to) this? i already
tried recovering the drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not
make a difference: Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 12 of 19

Anonymous
Not applicable
Steve - Perhaps you should find another place to display the resentment you
have for your own incompetence.

If you think others can't see your childish behavior for exactly what it is,
guess again.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
So stop pointing it at yourself.

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - Everyone that reads this newsgroup already
knows who the resident bottom-feeder is.

There's no need to point the finger .

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Nope, sorry, you're mistaken again.

You were and will always be the doorknob.

I was just curious if you had realized it yet, but I see you haven't.

And stop calling me Steve, whoever that is!

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - you will always be the doorknob here.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Now who's the doorknob?

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
That's nice Steve.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Oh, and I use Outlook Express ...

"Joe Sutphin" wrote in message
news:[email protected]...
This is a test in Rich Text format.


Option Explicit

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String

'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
Label1.Caption = strString
End Sub

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
If one is using a newsreader, that doesn't help, and code tags
or not, the entire message content is word-wrapped.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Kerry Brown" wrote in message
news:[email protected]...
http://discussion.autodesk.com/forums/ann.jspa?annID=125

"plamp" wrote in message news:[email protected]...
Dear Forum Users; I've been working with .NET and the AutoCAD API for a
while now, but here's something I really don't get. I've added an entity
to
a drawing, that contains the following XData (each line represents a new
TypedValue): type: 1001, value: 200903021622150430002 type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value displayed in
the first xdata-line is a RegAppName which I have added as a
RegAppTableRecord to the RegAppTable. My drawing is full of entities, but
I'd like to find exáctly this entity. I do this by creating a selection
filter and calling the selectAll method on the
Autodesk.Autocad.EditorInput.Editor-object. See the sample code below
{code}
'variable ID is of string value "200903021622150430002" Dim ent As Entity
=
nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End
If
End If {code} The Problem; This method does not álways seem to work. In
most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing.
What
could be the possible cause of (and solution to) this? i already
tried recovering the drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not
make a difference: Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 13 of 19

Anonymous
Not applicable
If you think others have anything but contempt for you, you are sorely
mistaken.

You should stop your obviously misguided rant before you do anything else to
tarnish your already reprensible reputation.

Your insistance on being childish is quickly becoming your greatest asset.

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - Perhaps you should find another place to display the resentment you
have for your own incompetence.

If you think others can't see your childish behavior for exactly what it is,
guess again.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
So stop pointing it at yourself.

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - Everyone that reads this newsgroup already
knows who the resident bottom-feeder is.

There's no need to point the finger .

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Nope, sorry, you're mistaken again.

You were and will always be the doorknob.

I was just curious if you had realized it yet, but I see you haven't.

And stop calling me Steve, whoever that is!

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - you will always be the doorknob here.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Now who's the doorknob?

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
That's nice Steve.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Oh, and I use Outlook Express ...

"Joe Sutphin" wrote in message
news:[email protected]...
This is a test in Rich Text format.


Option Explicit

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String

'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
Label1.Caption = strString
End Sub

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
If one is using a newsreader, that doesn't help, and code tags
or not, the entire message content is word-wrapped.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Kerry Brown" wrote in message
news:[email protected]...
http://discussion.autodesk.com/forums/ann.jspa?annID=125

"plamp" wrote in message news:[email protected]...
Dear Forum Users; I've been working with .NET and the AutoCAD API for a
while now, but here's something I really don't get. I've added an entity
to
a drawing, that contains the following XData (each line represents a new
TypedValue): type: 1001, value: 200903021622150430002 type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value displayed in
the first xdata-line is a RegAppName which I have added as a
RegAppTableRecord to the RegAppTable. My drawing is full of entities, but
I'd like to find exáctly this entity. I do this by creating a selection
filter and calling the selectAll method on the
Autodesk.Autocad.EditorInput.Editor-object. See the sample code below
{code}
'variable ID is of string value "200903021622150430002" Dim ent As Entity
=
nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End
If
End If {code} The Problem; This method does not álways seem to work. In
most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing.
What
could be the possible cause of (and solution to) this? i already
tried recovering the drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not
make a difference: Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 14 of 19

Anonymous
Not applicable
>>If you think others have anything but contempt for you, you are sorely
>>mistaken.
2 months ago you hadn't even debugged a .net application yet - I'll point
out the post if you like. Tony has been helping us all here for years. Go
away steve.


"Joe Sutphin" wrote in message news:[email protected]...
If you think others have anything but contempt for you, you are sorely
mistaken.

You should stop your obviously misguided rant before you do anything else to
tarnish your already reprensible reputation.

Your insistance on being childish is quickly becoming your greatest asset.

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - Perhaps you should find another place to display the resentment you
have for your own incompetence.

If you think others can't see your childish behavior for exactly what it is,
guess again.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
So stop pointing it at yourself.

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - Everyone that reads this newsgroup already
knows who the resident bottom-feeder is.

There's no need to point the finger .

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Nope, sorry, you're mistaken again.

You were and will always be the doorknob.

I was just curious if you had realized it yet, but I see you haven't.

And stop calling me Steve, whoever that is!

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - you will always be the doorknob here.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Now who's the doorknob?

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
That's nice Steve.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Oh, and I use Outlook Express ...

"Joe Sutphin" wrote in message
news:[email protected]...
This is a test in Rich Text format.


Option Explicit

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String

'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
Label1.Caption = strString
End Sub

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
If one is using a newsreader, that doesn't help, and code tags
or not, the entire message content is word-wrapped.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Kerry Brown" wrote in message
news:[email protected]...
http://discussion.autodesk.com/forums/ann.jspa?annID=125

"plamp" wrote in message news:[email protected]...
Dear Forum Users; I've been working with .NET and the AutoCAD API for a
while now, but here's something I really don't get. I've added an entity
to
a drawing, that contains the following XData (each line represents a new
TypedValue): type: 1001, value: 200903021622150430002 type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value displayed in
the first xdata-line is a RegAppName which I have added as a
RegAppTableRecord to the RegAppTable. My drawing is full of entities, but
I'd like to find exáctly this entity. I do this by creating a selection
filter and calling the selectAll method on the
Autodesk.Autocad.EditorInput.Editor-object. See the sample code below
{code}
'variable ID is of string value "200903021622150430002" Dim ent As Entity
=
nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End
If
End If {code} The Problem; This method does not álways seem to work. In
most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing.
What
could be the possible cause of (and solution to) this? i already
tried recovering the drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not
make a difference: Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 15 of 19

Anonymous
Not applicable
Hey Steve,

Next time you see Joe, tell him to replace "reprensible" by "reprehensible".
That's important for Joe, since he's also pretending to be a writer of books
on AutoCAD VBA.
There's nothing "reprensible" about T. Tanzillo's reputation.
The man has little patience with oafs. But that's not "reprensible".
So Steve, get thee hence, and stop waisting our time.

Greetings

"Joe Sutphin" wrote in message
news:[email protected]...
If you think others have anything but contempt for you, you are sorely
mistaken.

You should stop your obviously misguided rant before you do anything else to
tarnish your already reprensible reputation.

Your insistance on being childish is quickly becoming your greatest asset.

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - Perhaps you should find another place to display the resentment you
have for your own incompetence.

If you think others can't see your childish behavior for exactly what it is,
guess again.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
So stop pointing it at yourself.

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - Everyone that reads this newsgroup already
knows who the resident bottom-feeder is.

There's no need to point the finger .

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Nope, sorry, you're mistaken again.

You were and will always be the doorknob.

I was just curious if you had realized it yet, but I see you haven't.

And stop calling me Steve, whoever that is!

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - you will always be the doorknob here.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Now who's the doorknob?

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
That's nice Steve.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Oh, and I use Outlook Express ...

"Joe Sutphin" wrote in message
news:[email protected]...
This is a test in Rich Text format.


Option Explicit

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String

'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
Label1.Caption = strString
End Sub

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
If one is using a newsreader, that doesn't help, and code tags
or not, the entire message content is word-wrapped.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Kerry Brown" wrote in message
news:[email protected]...
http://discussion.autodesk.com/forums/ann.jspa?annID=125

"plamp" wrote in message news:[email protected]...
Dear Forum Users; I've been working with .NET and the AutoCAD API for a
while now, but here's something I really don't get. I've added an entity
to
a drawing, that contains the following XData (each line represents a new
TypedValue): type: 1001, value: 200903021622150430002 type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value displayed in
the first xdata-line is a RegAppName which I have added as a
RegAppTableRecord to the RegAppTable. My drawing is full of entities, but
I'd like to find exáctly this entity. I do this by creating a selection
filter and calling the selectAll method on the
Autodesk.Autocad.EditorInput.Editor-object. See the sample code below
{code}
'variable ID is of string value "200903021622150430002" Dim ent As Entity
=
nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End
If
End If {code} The Problem; This method does not álways seem to work. In
most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing.
What
could be the possible cause of (and solution to) this? i already
tried recovering the drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not
make a difference: Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 16 of 19

Anonymous
Not applicable
Or is it "wasting"?
Really don't know...

"Guido Rooms" wrote in message news:[email protected]...
Hey Steve,

Next time you see Joe, tell him to replace "reprensible" by "reprehensible".
That's important for Joe, since he's also pretending to be a writer of books
on AutoCAD VBA.
There's nothing "reprensible" about T. Tanzillo's reputation.
The man has little patience with oafs. But that's not "reprensible".
So Steve, get thee hence, and stop waisting our time.

Greetings

"Joe Sutphin" wrote in message
news:[email protected]...
If you think others have anything but contempt for you, you are sorely
mistaken.

You should stop your obviously misguided rant before you do anything else to
tarnish your already reprensible reputation.

Your insistance on being childish is quickly becoming your greatest asset.

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - Perhaps you should find another place to display the resentment you
have for your own incompetence.

If you think others can't see your childish behavior for exactly what it is,
guess again.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
So stop pointing it at yourself.

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - Everyone that reads this newsgroup already
knows who the resident bottom-feeder is.

There's no need to point the finger .

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Nope, sorry, you're mistaken again.

You were and will always be the doorknob.

I was just curious if you had realized it yet, but I see you haven't.

And stop calling me Steve, whoever that is!

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
Steve - you will always be the doorknob here.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Now who's the doorknob?

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
That's nice Steve.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Joe Sutphin" wrote in message
news:[email protected]...
Oh, and I use Outlook Express ...

"Joe Sutphin" wrote in message
news:[email protected]...
This is a test in Rich Text format.


Option Explicit

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String

'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
Label1.Caption = strString
End Sub

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
If one is using a newsreader, that doesn't help, and code tags
or not, the entire message content is word-wrapped.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Kerry Brown" wrote in message
news:[email protected]...
http://discussion.autodesk.com/forums/ann.jspa?annID=125

"plamp" wrote in message news:[email protected]...
Dear Forum Users; I've been working with .NET and the AutoCAD API for a
while now, but here's something I really don't get. I've added an entity
to
a drawing, that contains the following XData (each line represents a new
TypedValue): type: 1001, value: 200903021622150430002 type: 1002, value: {
type: 1000, value: Somestring type: 1002, value: } The value displayed in
the first xdata-line is a RegAppName which I have added as a
RegAppTableRecord to the RegAppTable. My drawing is full of entities, but
I'd like to find exáctly this entity. I do this by creating a selection
filter and calling the selectAll method on the
Autodesk.Autocad.EditorInput.Editor-object. See the sample code below
{code}
'variable ID is of string value "200903021622150430002" Dim ent As Entity
=
nothing Dim filter As TypedValue() = {New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)} Dim selfilter As New
SelectionFilter(filter) Dim pres As PromptSelectionResult =
ed.SelectAll(selfilter) If Not pres.Value Is Nothing Then Dim idarray As
ObjectId() = pres.Value.GetObjectIds() If idarray.Length > 0 Then Using tr
As Transaction = db.TransactionManager.StartTransaction Try ent =
DirectCast(tr.GetObject(idarray(0), OpenMode.ForRead, False), Entity)
Catch
ex As System.Exception Debug.WriteLine(ex.Message) End Try End Using End
If
End If {code} The Problem; This method does not álways seem to work. In
most
cases, the entity i am looking for will be found and retrieved by from the
Database. However, sometimes PromptSectionResult.Value is just Nothing.
What
could be the possible cause of (and solution to) this? i already
tried recovering the drawing, thus no errors might exist in the drawing i
guess¿ Also, adding a typedvalue that contains DxfCode.XDataSTart does not
make a difference: Dim filter As TypedValue() = {New
TypedValue(DxfCode.XDataStart), New
TypedValue(DxfCode.ExtendedDataRegAppName, ID)}
0 Likes
Message 17 of 19

Anonymous
Not applicable
{quote}

You should stop your obviously misguided rant before you do anything else to
tarnish your already reprensible reputation.

{quote}

I already tarnished my reptutation by having a conversation with you.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm
0 Likes
Message 18 of 19

Anonymous
Not applicable
If it helps you move on, you're welcome.

Joe ...


"Tony Tanzillo" wrote in message
news:[email protected]...
{quote}

You should stop your obviously misguided rant before you do anything else to
tarnish your already reprensible reputation.

{quote}

I already tarnished my reptutation by having a conversation with you.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm
0 Likes
Message 19 of 19

Anonymous
Not applicable
... so are there any comments directed at the real content of my post?

I mean: the codesample shóuld in theory work, right? or did I miss something...
0 Likes