Community
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6093915@discussion.autodesk.com">news:6093915@discussion.autodesk.com...
this is still unreadable in the Webreader... I
give.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6093914@discussion.autodesk.com">news:6093914@discussion.autodesk.com...
[code]
using (Transaction tr =
doc.TransactionManager.StartTransaction())
{
foreach (ObjectId id in ids)
{
Entity e =
(Entity)tr.GetObject
(id, OpenMode.ForRead);
Line
l = e as Line;
if (l !=
null)
{
outPut
+=
(string.Format
("Line startpoint:{0}\n",
l.StartPoint));
continue;
}
DBPoint p = e as DBPoint;
if
(p != null)
{
outPut
+=
(string.Format
("Point position:{0}\n",
p.Position));
continue;
}
//...
}
}
[/code]
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6093912@discussion.autodesk.com">news:6093912@discussion.autodesk.com...
Sure - post how you did it so others can
see.
This idea works for me...
{code}
using (Transaction tr =
doc.TransactionManager.StartTransaction())
{
foreach (ObjectId id in ids)
{
Entity e =
(Entity)tr.GetObject
(id, OpenMode.ForRead);
Line l = e as Line;
if (l !=
null)
{
outPut
+=
(string.Format
("Line startpoint:{0}\n",
l.StartPoint));
continue;
}
DBPoint p = e as DBPoint;
if
(p != null)
{
outPut
+=
(string.Format
("Point position:{0}\n",
p.Position));
continue;
}
//...
}
}
{code}
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<Ethiel> wrote in messageI
href="news:6093899@discussion.autodesk.com">news:6093899@discussion.autodesk.com...
have obtained all I needed. Many thanks to all for replies and help me.
😄 I can post my
code?.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Tony Tanzillo" <
href="mailto:tony.tanzillo@THE_URL_BELOW.com">tony.tanzillo@THE_URL_BELOW.com>
wrote in message
href="news:6094022@discussion.autodesk.com">news:6094022@discussion.autodesk.com...
It looks like its also mangled from a newsreader,
because
the Line variable is a vertical bar (illegal). I'm curious
as to
how that was mangled. What as the actual variable
used?
I'm just becoming more and more convinced that
what's
actually going with the discussion group nonsense, is
deliberate, malicious sabotage, with little regards for
how
bad it makes the entire organization look.
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000
through 2009
href="http://www.acadxtabs.com">http://www.acadxtabs.com
Introducing AcadXTabs 2010:
href="http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm">http://www.caddzone.com/acadxtabs/Acad...
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6093915@discussion.autodesk.com">news:6093915@discussion.autodesk.com...
this is still unreadable in the Webreader... I
give.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6093914@discussion.autodesk.com">news:6093914@discussion.autodesk.com...
[code]
using (Transaction tr =
doc.TransactionManager.StartTransaction())
{
foreach (ObjectId id in ids)
{
Entity e =
(Entity)tr.GetObject
(id, OpenMode.ForRead);
Line l = e as Line;
if (l !=
null)
{
outPut
+=
(string.Format
("Line startpoint:{0}\n",
l.StartPoint));
continue;
}
DBPoint p = e as DBPoint;
if
(p != null)
{
outPut
+=
(string.Format
("Point position:{0}\n",
p.Position));
continue;
}
//...
}
}
[/code]
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6093912@discussion.autodesk.com">news:6093912@discussion.autodesk.com...
Sure - post how you did it so others can
see.
This idea works for me...
{code}
using (Transaction tr =
doc.TransactionManager.StartTransaction())
{
foreach (ObjectId id in ids)
{
Entity e =
(Entity)tr.GetObject
(id,
OpenMode.ForRead);
Line l = e as Line;
if (l
!= null)
{
outPut
+=
(string.Format
("Line startpoint:{0}\n",
l.StartPoint));
continue;
}
DBPoint p = e as DBPoint;
if (p != null)
{
outPut
+=
(string.Format
("Point position:{0}\n",
p.Position));
continue;
}
//...
}
}
{code}
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<Ethiel> wrote in messageI
href="news:6093899@discussion.autodesk.com">news:6093899@discussion.autodesk.com...
have obtained all I needed. Many thanks to all for replies and help
me. 😄 I can post my
code?.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Tony Tanzillo" <
href="mailto:tony.tanzillo@THE_URL_BELOW.com">tony.tanzillo@THE_URL_BELOW.com>
wrote in message
href="news:6094022@discussion.autodesk.com">news:6094022@discussion.autodesk.com...
It looks like its also mangled from a newsreader,
because
the Line variable is a vertical bar (illegal). I'm curious
as to
how that was mangled. What as the actual variable
used?
I'm just becoming more and more convinced that
what's
actually going with the discussion group nonsense, is
deliberate, malicious sabotage, with little regards for
how
bad it makes the entire organization look.
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000
through 2009
href="http://www.acadxtabs.com">http://www.acadxtabs.com
Introducing AcadXTabs 2010:
href="http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm">http://www.caddzone.com/acadxtabs/Acad...
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6093915@discussion.autodesk.com">news:6093915@discussion.autodesk.com...
this is still unreadable in the Webreader... I
give.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6093914@discussion.autodesk.com">news:6093914@discussion.autodesk.com...
[code]
using (Transaction tr =
doc.TransactionManager.StartTransaction())
{
foreach (ObjectId id in ids)
{
Entity e =
(Entity)tr.GetObject
(id, OpenMode.ForRead);
Line l = e as Line;
if (l !=
null)
{
outPut
+=
(string.Format
("Line startpoint:{0}\n",
l.StartPoint));
continue;
}
DBPoint p = e as DBPoint;
if
(p != null)
{
outPut
+=
(string.Format
("Point position:{0}\n",
p.Position));
continue;
}
//...
}
}
[/code]
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6093912@discussion.autodesk.com">news:6093912@discussion.autodesk.com...
Sure - post how you did it so others can
see.
This idea works for me...
{code}
using (Transaction tr =
doc.TransactionManager.StartTransaction())
{
foreach (ObjectId id in ids)
{
Entity e =
(Entity)tr.GetObject
(id,
OpenMode.ForRead);
Line l = e as Line;
if (l
!= null)
{
outPut
+=
(string.Format
("Line startpoint:{0}\n",
l.StartPoint));
continue;
}
DBPoint p = e as DBPoint;
if (p != null)
{
outPut
+=
(string.Format
("Point position:{0}\n",
p.Position));
continue;
}
//...
}
}
{code}
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<Ethiel> wrote in messageI
href="news:6093899@discussion.autodesk.com">news:6093899@discussion.autodesk.com...
have obtained all I needed. Many thanks to all for replies and help
me. 😄 I can post my
code?.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6094121@discussion.autodesk.com">news:6094121@discussion.autodesk.com...
Tony - care to share how you step through
and check type? Everything I've read says not to
use if (typeof(...)) else if (...). Casting using
'as' seems to be a good solution.
Thanks!
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Tony Tanzillo" <
href="mailto:tony.tanzillo@THE_URL_BELOW.com">tony.tanzillo@THE_URL_BELOW.com>
wrote in message
href="news:6094022@discussion.autodesk.com">news:6094022@discussion.autodesk.com...
It looks like its also mangled from a newsreader,
because
the Line variable is a vertical bar (illegal). I'm curious
as to
how that was mangled. What as the actual variable
used?
I'm just becoming more and more convinced that
what's
actually going with the discussion group nonsense, is
deliberate, malicious sabotage, with little regards for
how
bad it makes the entire organization look.
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD
2000 through 2009
href="http://www.acadxtabs.com">http://www.acadxtabs.com
Introducing AcadXTabs 2010:
href="http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm">http://www.caddzone.com/acadxtabs/Ac...
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6093915@discussion.autodesk.com">news:6093915@discussion.autodesk.com...
this is still unreadable in the Webreader...
I give.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6093914@discussion.autodesk.com">news:6093914@discussion.autodesk.com...
[code]
using (Transaction tr =
doc.TransactionManager.StartTransaction())
{
foreach (ObjectId id in ids)
{
Entity e =
(Entity)tr.GetObject
(id,
OpenMode.ForRead);
Line l = e as Line;
if (l
!= null)
{
outPut
+=
(string.Format
("Line startpoint:{0}\n",
l.StartPoint));
continue;
}
DBPoint p = e as DBPoint;
if (p != null)
{
outPut
+=
(string.Format
("Point position:{0}\n",
p.Position));
continue;
}
//...
}
}
[/code]
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in
message
href="news:6093912@discussion.autodesk.com">news:6093912@discussion.autodesk.com...
Sure - post how you did it so others can
see.
This idea works for me...
{code}
using (Transaction tr =
doc.TransactionManager.StartTransaction())
{
foreach (ObjectId id in ids)
{
Entity e =
(Entity)tr.GetObject
(id,
OpenMode.ForRead);
size=2> Line l = e as
Line;
if (l !=
null)
{
outPut
+=
(string.Format
("Line startpoint:{0}\n",
l.StartPoint));
continue;
}
size=2> DBPoint p = e as
DBPoint;
if (p !=
null)
{
outPut
+=
(string.Format
("Point position:{0}\n",
p.Position));
continue;
}
size=2>
//...
}
}
{code}
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<Ethiel> wrote in messageI
href="news:6093899@discussion.autodesk.com">news:6093899@discussion.autodesk.com...
have obtained all I needed. Many thanks to all for replies and help
me. 😄 I can post my
code?.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Tony Tanzillo" <
href="mailto:tony.tanzillo@THE_URL_BELOW.com">tony.tanzillo@THE_URL_BELOW.com>
wrote in message
href="news:6094348@discussion.autodesk.com">news:6094348@discussion.autodesk.com...
typeof( typename ) returns a type, which you can compare
to
another type, but that's something I do only if I want to
know
if the two types are the exact same type.
Usually I don't want to know that. Rather, I want to know
if
a given object is an instance of a given type, or any
derived
type, which is what the 'is' operator does.
If you have two types and want to know if one is derived
from
the other you can use Type.IsAssignableFrom(type), which
is
true if the type you call it on, is the type you pass, or
any base
type.
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000
through 2009
href="http://www.acadxtabs.com">http://www.acadxtabs.com
Introducing AcadXTabs 2010:
href="http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm">http://www.caddzone.com/acadxtabs/Acad...
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6094121@discussion.autodesk.com">news:6094121@discussion.autodesk.com...
Tony - care to share how you step through
and check type? Everything I've read says not to
use if (typeof(...)) else if (...). Casting
using 'as' seems to be a good solution.
Thanks!
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Tony Tanzillo" <
href="mailto:tony.tanzillo@THE_URL_BELOW.com">tony.tanzillo@THE_URL_BELOW.com>
wrote in message
href="news:6094022@discussion.autodesk.com">news:6094022@discussion.autodesk.com...
It looks like its also mangled from a newsreader,
because
the Line variable is a vertical bar (illegal). I'm
curious as to
how that was mangled. What as the actual variable
used?
I'm just becoming more and more convinced that
what's
actually going with the discussion group nonsense, is
deliberate, malicious sabotage, with little regards for
how
bad it makes the entire organization look.
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD
2000 through 2009
href="http://www.acadxtabs.com">http://www.acadxtabs.com
Introducing AcadXTabs 2010:
href="http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm">http://www.caddzone.com/acadxtabs/...
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in message
href="news:6093915@discussion.autodesk.com">news:6093915@discussion.autodesk.com...
this is still unreadable in the
Webreader... I give.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in
message
href="news:6093914@discussion.autodesk.com">news:6093914@discussion.autodesk.com...
[code]
using (Transaction tr =
doc.TransactionManager.StartTransaction())
{
foreach (ObjectId id in ids)
{
Entity e =
(Entity)tr.GetObject
(id,
OpenMode.ForRead);
size=2> Line l = e as
Line;
if (l !=
null)
{
outPut
+=
(string.Format
("Line startpoint:{0}\n",
l.StartPoint));
continue;
}
size=2> DBPoint p = e as
DBPoint;
if (p !=
null)
{
outPut
+=
(string.Format
("Point position:{0}\n",
p.Position));
continue;
}
size=2>
//...
}
}
[/code]
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Paul Richardson" <prichardson<lastpoint> wrote in
message
href="news:6093912@discussion.autodesk.com">news:6093912@discussion.autodesk.com...
Sure - post how you did it so others
can see.
This idea works for me...
{code}
using (Transaction tr =
doc.TransactionManager.StartTransaction())
{
foreach (ObjectId id in ids)
{
Entity e =
(Entity)tr.GetObject
(id,
OpenMode.ForRead);
size=2> Line l = e as
Line;
if (l !=
null)
{
outPut
+=
(string.Format
("Line startpoint:{0}\n",
l.StartPoint));
continue;
}
size=2> DBPoint p = e as
DBPoint;
if (p !=
null)
{
outPut
+=
(string.Format
("Point position:{0}\n",
p.Position));
continue;
}
size=2>
//...
}
}
{code}
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<Ethiel> wrote in messageI
href="news:6093899@discussion.autodesk.com">news:6093899@discussion.autodesk.com...
have obtained all I needed. Many thanks to all for replies and
help me. 😄 I can post my
code?.