Author Topic: Bricscad && .NET  (Read 62027 times)

0 Members and 2 Guests are viewing this topic.

jgr

  • Guest
Re: Bricscad && .NET
« Reply #210 on: January 04, 2011, 11:25:00 PM »
DisposableWrapper looks to be a base class(it is marked as abstract so it meant to be used as base class) that
I would guess it is inherited for all the classes in the managed API that need or want dispose to be called. For example entites in a using block.
Here is a link to Idisposable interface LINK

Thanks. I understand it:
DisposableWrapper implements (+-) the Idisposable interface for unmanaged objects.

But: how use rxnet DisposableWrapper (as resbuf)?

Thank you very much for replying.

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 7047
  • AKA Daniel
Re: Bricscad && .NET
« Reply #211 on: January 05, 2011, 08:28:42 AM »
I can wrap those functions for you if needed, provided they are available in BRX.  but if you can do this via COM, even better.  I.e AcadApplication.ActiveDocument.EvaluateLisp();

Also another way to exec lisp routines.
http://www.theswamp.org/index.php?topic=29100.msg373262#msg373262

jgr

  • Guest
Re: Bricscad && .NET
« Reply #212 on: January 05, 2011, 02:48:21 PM »
I can wrap those functions for you if needed, provided they are available in BRX.  but if you can do this via COM, even better.  I.e AcadApplication.ActiveDocument.EvaluateLisp();

Thank you very much but it is not necessary. Works well with AcadApplication.ActiveDocument.EvaluateLisp

Code: [Select]
Dim a As AcadApplication = DirectCast(RxNet.ApplicationServices.Application.AcadApplication, AcadApplication)
Dim d As IAcadDocument = a.ActiveDocument
Dim o, op As Object
d.Utility.GetEntity(o, op)

Dim e As AcadEntity = DirectCast(o, AcadEntity)
Dim h As String = e.Handle
If IsNumeric(h) Then
    d.EvaluateLisp ("(setq handle (itoa " & h & "))")
Else
    d.EvaluateLisp ("(setq handle " & h & ")")
End If

d.EvaluateLisp ("(setq curve (handent handle))")

Dim r As System.Array
r = DirectCast(d.EvaluateLisp("(vlax-curve-getPointAtDist curve 100)"), Array)

d.EvaluateLisp ("(setq handle nil)")
d.EvaluateLisp ("(setq curve nil)")

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 7047
  • AKA Daniel
Re: Bricscad && .NET
« Reply #213 on: April 20, 2011, 03:23:01 AM »
As noted here,
http://www.theswamp.org/index.php?topic=37990.msg430062#new
Bricscad and .NET is on the way, therefore this project is now depreciated   8-)

Daniel Eiszele

  • Newt
  • Posts: 85
Re: Bricscad && .NET
« Reply #214 on: April 20, 2011, 04:32:51 AM »
Thanks for all your hard work Daniel.  Your netload routine certainly piqued my interest for the topic!

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 7047
  • AKA Daniel
Re: Bricscad && .NET
« Reply #215 on: April 20, 2011, 04:40:05 AM »
my pleasure. Really a great learning experience.
BTY, I will keep it around for people using older versions of BCad.

And now off to play with the new API!   :laugh: