.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extracting Line properties from selection set, C# via COM

2 REPLIES 2
Reply
Message 1 of 3
dnlo
483 Views, 2 Replies

Extracting Line properties from selection set, C# via COM

Hello,
I'm using ActiveX methods from C#. I have a selection set of AcadLine entities and need to access their StrartPoint, EndPoint values. I get an object in selection set and trying to cast to AcadLine, then access its values. The code compiles, but at runtime have an error, saying the object referenced has not been instantiated. What is the problem?
How to get AcadLine properties from selection set?
Thanks in advance.
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: dnlo

Are you expecting someone to guess what your code
isn't doing correctly?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5132413@discussion.autodesk.com...
Hello,
I'm using ActiveX methods from C#. I have a selection set of AcadLine entities and need to access their StrartPoint, EndPoint values. I get an object in selection set and trying to cast to AcadLine, then access its values. The code compiles, but at runtime have an error, saying the object referenced has not been instantiated. What is the problem?
How to get AcadLine properties from selection set?
Thanks in advance.
Message 3 of 3
dnlo
in reply to: dnlo

Sorry,
the code is something like that:

for (...)
{
AcadEntity objInSset = sSetAllObjects((object) i);// sSetAllObject - selection set

AcadLine lineInSset;
lineInSset =(AcadLine)objInSset();
SomeDynamicArray.Add(lineInSset.Endpoint);//here is the problem

}

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost