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

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: Bricscad && .NET
« Reply #195 on: November 24, 2010, 06:30:13 AM »
Also.. I would 'really' like to encourage the users of these DLLs to move to .NET 4.0 and VS2010.  It's much better at handling COM : )

iraklis

  • Guest
Re: Bricscad && .NET
« Reply #196 on: November 24, 2010, 07:51:39 AM »
Thank you for the reply. I will try it.

Well considering the use of VS2010 I have not yet tried it so I would like to have your opinion. Does it worth to buy yet another VS and to use it in parallel with VS2005 (for BRX) , VS2008 (for Acad newer than V2009) and now VS2010?.

Best regards.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: Bricscad && .NET
« Reply #197 on: November 24, 2010, 08:17:06 AM »
Depends on what you're doing I suppose,  I have VC6-VC10 on my machine. Of course if your just doing C#, than the VS2010 express(free)  ought to be enough .?. 

If you plan on doing more native code, then have a look a VC10pro build targeting ..
http://blogs.msdn.com/b/vcblog/archive/2009/12/08/c-native-multi-targeting.aspx

Personally, I would like to drop support for .NET 2.0.. its ancient history in .NET years and its much easier for me to maintain a single version  :wink:

Helios

  • Guest
Re: Bricscad && .NET
« Reply #198 on: December 10, 2010, 04:48:47 AM »
I was wondering Daniel,

would it be possible to run (or make run) your RxNet installer in Silent mode, so no user interaction is required?
Like RxNetSetup /S11 to 'Silently' install for V11?
After that I can let my own installer move the dll and change the registered path...

Or:

Can I set registry keys myself to 'tell' Bricscad where I put the RxNet.dll?

Cheers,
Arno
 

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: Bricscad && .NET
« Reply #199 on: December 10, 2010, 06:31:39 AM »
All my installer does is copy the file to drive and create the demand loading entry in the registry, so you can roll your own if you wish.

I could probably create a msi or merge module if needed, INNO installer does not have the silent option.

Helios

  • Guest
Re: Bricscad && .NET
« Reply #200 on: December 10, 2010, 09:06:35 AM »
Ok Daniel,

we'll give it a crack.
Will let you know how things work out.

ttyl

Helios

  • Guest
Re: Bricscad && .NET
« Reply #201 on: December 10, 2010, 10:40:44 AM »
That was pretty painless.
Moved DLL and adjusted registry path (as you sugested in earlier message).
But just tackling the demandload entry is enough. Great.
I'm having lots of fun with this RxNet stuff, it's very usefull.
(Provided the correct RxLoader....... is used  :lmao:)

Cheers

Helios

  • Guest
Re: Bricscad && .NET
« Reply #202 on: January 03, 2011, 11:15:27 AM »
Hi Daniel, best wishes for 2011!

I'm starting off this year fresh with an upgrade to Bricscad V11.2.5 and adjusting to the V4 RxNet dll's for V11. (V4.0.30128)
We have also upgraded our source code to .NET V4.
My registry path is adjusted, so RxNet.Dll gets loaded on startup of V11.
The RxLoader takes care of loading my own VOSS.RxNet.Dll.
When I type a RxNet command in V11 , Bricscad responds ok.

However.... :-o

With the RxNet stuff loaded, trying a ThisDrawing.Application.Documents.open("c:\temp\somedrawing.dwg") in the VBA editor immediatly shuts down V11.
First I disabled the RxLoader so only (your)RxNet.dll gets loaded. (Not my VOSS.RxNet.DLL)
Still same shutdown behaviour.
Only when NO RxNet.Dll is loaded, the .Open method works in VBA.

Can you replicate this behaviour or have any other clue?


Arno


It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: Bricscad && .NET
« Reply #203 on: January 03, 2011, 08:38:24 PM »
I will take a look    :-o

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: Bricscad && .NET
« Reply #204 on: January 03, 2011, 09:26:15 PM »
Arno, try this...

Create a file called bricscad.exe.config, with these settings inside, and put it in the Bricscad folder.

Code: [Select]
<configuration>
 <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0.30128"/>
    <supportedRuntime version="v4.0"/>
  </startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <publisherPolicy apply="no" />
    </assemblyBinding>
<loadFromRemoteSources enabled="true" />
  </runtime>
</configuration>
 

Helios

  • Guest
Re: Bricscad && .NET
« Reply #205 on: January 04, 2011, 06:23:49 AM »
Thanks Daniel,

that seems to have solved the problem.  After adding bricscad.exe.config (no .txt at the end  :lmao:) it all works.

Question:
Do I have to maintain this file with upcoming future updates?

Arno

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: Bricscad && .NET
« Reply #206 on: January 04, 2011, 06:50:50 AM »
Hi Arno,

I shouldn't need any changing in the near term.. but, At some point Bricsys will add support for  managed wrappers , I'm not sure when, or  whether or not it will be will be based .NET 2.0 or .NET 4.0. I hope it's 4.0, but more than likely it will be .net 2.0.  You may have to do adjustments at that point. Until then, that should be your default bricscad.exe.config for .NET 4.0  :-)

Helios

  • Guest
Re: Bricscad && .NET
« Reply #207 on: January 04, 2011, 08:00:50 AM »
Thanks again Daniel.

Your wrappers are doing a pretty good job for me at the moment, swapping to managed .Net wrappers will take some different mindsettings I guess.
Sniffed through a couple of books already, but did not have a chance to get some hands on experience yet.
Looking forward to Bricscad's implementation, will be interesting to see its performance.

TTYL,
Arno

jgr

  • Guest
Re: Bricscad && .NET
« Reply #208 on: January 04, 2011, 08:58:27 PM »
How do i use DisposableWrapper? (Nor do i understand how it works in autocad)

Is it suitable for acedGetSym and acedEvaluateLISP?. I tried using it but it seems it is not possible.
(I used some of this code: http://www.theswamp.org/index.php?topic=33611.0)

Thanks, and forgiveness for my bad english

PD:
Needed this to emulate "VLAX" in bricscad, but it seems that can be done with AcadDocument.EvaluateLisp.

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Bricscad && .NET
« Reply #209 on: January 04, 2011, 10:50:47 PM »
How do i use DisposableWrapper? (Nor do i understand how it works in autocad)

Is it suitable for acedGetSym and acedEvaluateLISP?. I tried using it but it seems it is not possible.
(I used some of this code: http://www.theswamp.org/index.php?topic=33611.0)

Thanks, and forgiveness for my bad english

PD:
Needed this to emulate "VLAX" in bricscad, but it seems that can be done with AcadDocument.EvaluateLisp.
DisposableWrapper looks to be a base class(it is marked as abstract so it meant to be used as base class) that implements the Idisposable interface.
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