• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    *Tony Tanzillo

    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.
    Please use plain text.
    *Tony Tanzillo

    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.
    Please use plain text.
    *Tony Tanzillo

    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.
    Please use plain text.
    Active Contributor
    Posts: 43
    Registered: ‎04-21-2005

    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.
    Please use plain text.
    *Albert Szilvasy

    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.
    Please use plain text.
    *Tony Tanzillo

    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.
    Please use plain text.