.NET

Reply
*Tony Tanzillo
Message 11 of 16 (80 Views)

Re: How to wrapper the acutBuilList function?

06-03-2005 09:47 AM in reply to: tangferry
By the way, feel free to point out any mistakes
or massive blunders in that code, or embellish it
as you wish :-)

I'm very interested in finding a way to convert the
unmanaged selection set to a managed SelectionSet
(SelectionSetDelayMarshalled or SelectionSetFullyMarshalled,
depending I guess, on whether acedSSNameX information
is needed).

--
http://www.caddzone.com

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

"Albert Szilvasy" wrote in message news:4864849@discussion.autodesk.com...
It is actually not completely useless. You just need to call acedSSGet
directly with the resbuf. I try to put together an example today or over the
weekend.

albert
"Tony Tanzillo" wrote in message
news:4864380@discussion.autodesk.com...
Sorry, I failed to consider that in order to use a
ResultBuffer for object selection filtering, you must
call the AsArray() member, and if you look at my
original workaround, you'll see the caveat that you
can't do that after hacking the ResultBuffer.

So, the workaround is essentially useless.

Let's see what else we can come up with ....

--
http://www.caddzone.com

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

wrote in message news:4864330@discussion.autodesk.com...
I want to select circles and lines using selectionset.
The source code file is in the attachment.
But when i test it in AutoCAD,I get the following error message:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
System.NullReferenceException: Object reference not set to an ins
tance of an object.
at Autodesk.AutoCAD.DatabaseServices.ResultBuffer..ctor(TypedValue[]
values)
at Autodesk.AutoCAD.EditorInput.FilterExtractor.__ctor(FilterExtractor* ,
SelectionFilter filter)
at Autodesk.AutoCAD.EditorInput.Editor.GetSelection(SelectionFilter
filter)
at ClassLibrary.DNOTClass.test()
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[]
parameters,
CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean
verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[]
parameters, CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[]
parameters, CultureInfo culture)
at AcMgPerDocumentCommandClass.Invoke(AcMgPerDocumentCommandClass* ,
gcroot<:REFL>
ection::MethodInfo __gc *>* mi)
at Autodesk.AutoCAD.Runtime.SEHExceptionFilter.InvokeWorker()
at Autodesk.AutoCAD.Runtime.ExceptionFilter.Invoke()

How to solve this problem?Thanks.
*Tony Tanzillo
Message 12 of 16 (80 Views)

Re: How to wrapper the acutBuilList function?

06-03-2005 11:43 AM in reply to: tangferry
The file I posted was mangled by the news server.

Here it is again, with a .txt extension.

--
http://www.caddzone.com

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

"Albert Szilvasy" wrote in message news:4864849@discussion.autodesk.com...
It is actually not completely useless. You just need to call acedSSGet
directly with the resbuf. I try to put together an example today or over the
weekend.

albert
"Tony Tanzillo" wrote in message
news:4864380@discussion.autodesk.com...
Sorry, I failed to consider that in order to use a
ResultBuffer for object selection filtering, you must
call the AsArray() member, and if you look at my
original workaround, you'll see the caveat that you
can't do that after hacking the ResultBuffer.

So, the workaround is essentially useless.

Let's see what else we can come up with ....

--
http://www.caddzone.com

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

wrote in message news:4864330@discussion.autodesk.com...
I want to select circles and lines using selectionset.
The source code file is in the attachment.
But when i test it in AutoCAD,I get the following error message:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
System.NullReferenceException: Object reference not set to an ins
tance of an object.
at Autodesk.AutoCAD.DatabaseServices.ResultBuffer..ctor(TypedValue[]
values)
at Autodesk.AutoCAD.EditorInput.FilterExtractor.__ctor(FilterExtractor* ,
SelectionFilter filter)
at Autodesk.AutoCAD.EditorInput.Editor.GetSelection(SelectionFilter
filter)
at ClassLibrary.DNOTClass.test()
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[]
parameters,
CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean
verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[]
parameters, CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[]
parameters, CultureInfo culture)
at AcMgPerDocumentCommandClass.Invoke(AcMgPerDocumentCommandClass* ,
gcroot<:REFL>
ection::MethodInfo __gc *>* mi)
at Autodesk.AutoCAD.Runtime.SEHExceptionFilter.InvokeWorker()
at Autodesk.AutoCAD.Runtime.ExceptionFilter.Invoke()

How to solve this problem?Thanks.
*Tony Tanzillo
Message 13 of 16 (80 Views)

Re: How to wrapper the acutBuilList function?

06-03-2005 12:07 PM in reply to: tangferry
Nope - That didn't work either.

Let's try it with a different code page.

--
http://www.caddzone.com

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

"Albert Szilvasy" wrote in message news:4864849@discussion.autodesk.com...
It is actually not completely useless. You just need to call acedSSGet
directly with the resbuf. I try to put together an example today or over the
weekend.

albert
"Tony Tanzillo" wrote in message
news:4864380@discussion.autodesk.com...
Sorry, I failed to consider that in order to use a
ResultBuffer for object selection filtering, you must
call the AsArray() member, and if you look at my
original workaround, you'll see the caveat that you
can't do that after hacking the ResultBuffer.

So, the workaround is essentially useless.

Let's see what else we can come up with ....

--
http://www.caddzone.com

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

wrote in message news:4864330@discussion.autodesk.com...
I want to select circles and lines using selectionset.
The source code file is in the attachment.
But when i test it in AutoCAD,I get the following error message:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
System.NullReferenceException: Object reference not set to an ins
tance of an object.
at Autodesk.AutoCAD.DatabaseServices.ResultBuffer..ctor(TypedValue[]
values)
at Autodesk.AutoCAD.EditorInput.FilterExtractor.__ctor(FilterExtractor* ,
SelectionFilter filter)
at Autodesk.AutoCAD.EditorInput.Editor.GetSelection(SelectionFilter
filter)
at ClassLibrary.DNOTClass.test()
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[]
parameters,
CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean
verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[]
parameters, CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[]
parameters, CultureInfo culture)
at AcMgPerDocumentCommandClass.Invoke(AcMgPerDocumentCommandClass* ,
gcroot<:REFL>
ection::MethodInfo __gc *>* mi)
at Autodesk.AutoCAD.Runtime.SEHExceptionFilter.InvokeWorker()
at Autodesk.AutoCAD.Runtime.ExceptionFilter.Invoke()

How to solve this problem?Thanks.
Active Contributor
tangferry
Posts: 43
Registered: ‎04-21-2005
Message 14 of 16 (80 Views)

Re: How to wrapper the acutBuilList function?

06-04-2005 12:13 AM in reply to: tangferry
Thanks everyone!
Perhaps my C++ is poor,I have used com to solve this problem,and it does work.
*Albert Szilvasy
Message 15 of 16 (80 Views)

Re: How to wrapper the acutBuilList function?

06-06-2005 10:55 AM in reply to: tangferry
Why don't you load it and save it once in Notepad. I think that will work.

albert
"Tony Tanzillo" wrote in message
news:4865216@discussion.autodesk.com...
Nope - That didn't work either.

Let's try it with a different code page.

--
http://www.caddzone.com

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

"Albert Szilvasy" wrote in message
news:4864849@discussion.autodesk.com...
It is actually not completely useless. You just need to call acedSSGet
directly with the resbuf. I try to put together an example today or over the
weekend.

albert
"Tony Tanzillo"
illo@U_KNOW_WHERE.com> wrote in message
news:4864380@discussion.autodesk.com...
Sorry, I failed to consider that in order to use a
ResultBuffer for object selection filtering, you must
call the AsArray() member, and if you look at my
original workaround, you'll see the caveat that you
can't do that after hacking the ResultBuffer.

So, the workaround is essentially useless.

Let's see what else we can come up with ....

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoC
AD 2004/2005/2006
http://www.acadxtabs.com

wrote in message news:4864330@discussion.autodesk.com...
I want to select circles and lines using selectionset.
The source code file is in the attachment.
But when i test it in AutoCAD,I get the following error message:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been t
hrown by
the target of an invocation. --->
System.NullReferenceException: Object reference not set to an ins
tance of an object.
at Autodesk.AutoCAD.DatabaseServices.ResultBuffer..ctor(TypedValue[]
values)
at Autodesk.AutoCAD.EditorInput.FilterExtractor.__ctor(FilterExtractor* ,
SelectionFilter filter)
at Autodesk.AutoCAD.EditorInput.Editor.GetSelection(SelectionFilter
filter)
at ClassLibrary.DNOTClass.test()
--- End of inner exception stack trace ---
at Sys
tem.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[]
parameters,
CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean
verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[]
parameters, CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object
[]
parameters, CultureInfo culture)
at AcMgPerDocumentCommandClass.Invoke(AcMgPerDocumentCommandClass* ,
gcroot<:REFL>
ection::MethodInfo __gc *>* mi)
at Autodesk.AutoCAD.Runtime.SEHExceptionFilter.InvokeWorker()
at Autodesk.AutoCAD.Runtime.ExceptionFilter.Invoke()

How to solve this problem?Thanks.
*Tony Tanzillo
Message 16 of 16 (80 Views)

Re: How to wrapper the acutBuilList function?

06-06-2005 12:35 PM in reply to: tangferry
Hi Albert.

I tried that too, but it didn't seem to matter.


--
http://www.caddzone.com

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

"Albert Szilvasy" wrote in message news:4866567@discussion.autodesk.com...
Why don't you load it and save it once in Notepad. I think that will work.

albert
"Tony Tanzillo" wrote in message
news:4865216@discussion.autodesk.com...
Nope - That didn't work either.

Let's try it with a different code page.

--
http://www.caddzone.com

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

"Albert Szilvasy" wrote in message
news:4864849@discussion.autodesk.com...
It is actually not completely useless. You just need to call acedSSGet
directly with the resbuf. I try to put together an example today or over the
weekend.

albert
"Tony Tanzillo"
illo@U_KNOW_WHERE.com> wrote in message
news:4864380@discussion.autodesk.com...
Sorry, I failed to consider that in order to use a
ResultBuffer for object selection filtering, you must
call the AsArray() member, and if you look at my
original workaround, you'll see the caveat that you
can't do that after hacking the ResultBuffer.

So, the workaround is essentially useless.

Let's see what else we can come up with ....

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoC
AD 2004/2005/2006
http://www.acadxtabs.com

wrote in message news:4864330@discussion.autodesk.com...
I want to select circles and lines using selectionset.
The source code file is in the attachment.
But when i test it in AutoCAD,I get the following error message:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been t
hrown by
the target of an invocation. --->
System.NullReferenceException: Object reference not set to an ins
tance of an object.
at Autodesk.AutoCAD.DatabaseServices.ResultBuffer..ctor(TypedValue[]
values)
at Autodesk.AutoCAD.EditorInput.FilterExtractor.__ctor(FilterExtractor* ,
SelectionFilter filter)
at Autodesk.AutoCAD.EditorInput.Editor.GetSelection(SelectionFilter
filter)
at ClassLibrary.DNOTClass.test()
--- End of inner exception stack trace ---
at Sys
tem.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[]
parameters,
CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean
verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[]
parameters, CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object
[]
parameters, CultureInfo culture)
at AcMgPerDocumentCommandClass.Invoke(AcMgPerDocumentCommandClass* ,
gcroot<:REFL>
ection::MethodInfo __gc *>* mi)
at Autodesk.AutoCAD.Runtime.SEHExceptionFilter.InvokeWorker()
at Autodesk.AutoCAD.Runtime.ExceptionFilter.Invoke()

How to solve this problem?Thanks.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community