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

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8712
  • AKA Daniel
Re: Bricscad && .NET
« Reply #135 on: October 04, 2010, 08:46:54 AM »
Anyone still using .NET 2.0.. can I drop it?

jgr

  • Guest
Re: Bricscad && .NET
« Reply #136 on: October 04, 2010, 09:20:09 AM »
how about I add a global function getWorkingDatabase() as an IntPtr   :-o
sounds dangerous  :laugh:

That's what I need. It is possible or not?

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8712
  • AKA Daniel
Re: Bricscad && .NET
« Reply #137 on: October 04, 2010, 10:14:38 AM »
Its untested but here is the sig

Code: [Select]
GlobalFunctions::GetWorkingDatabasePtr();

jgr

  • Guest
Re: Bricscad && .NET
« Reply #138 on: October 04, 2010, 12:02:40 PM »
Its untested but here is the sig

Code: [Select]
GlobalFunctions::GetWorkingDatabasePtr();

Thank you very much.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8712
  • AKA Daniel
Re: Bricscad && .NET
« Reply #139 on: October 04, 2010, 12:07:04 PM »
You're welcome, its attached to the first post in this thread : )

jgr

  • Guest
Re: Bricscad && .NET
« Reply #140 on: October 07, 2010, 01:06:31 PM »
I tested GetWorkingDatabasePtr with acdbSaveAs2000, acdbDxfOutAs2004 and acdbGetCurVportId :

- acdbSaveAs2000, acdbDxfOutAs2004 retun eFileAccessErr
-adjustAlignment retun eNotHandled
- acdbGetCurVportId seems to work

And... acdbTextFind does not exist. I was wrong :oops:


And a question:
Is it possible to execute code when loading an assembly?, As in autocad with IExtensionApplication.Initialize (or delphi dll's with DLL_PROCESS_ATTACH), but without using IExtensionApplication.

If it is possible: how?

Thanks.

SimonPapadopoulos

  • Guest
Re: Bricscad && .NET
« Reply #141 on: October 18, 2010, 06:18:30 AM »
Hi !

Are there any equivalent events in BricsCAD to the following AutoCAD events?

Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.DocumentBecameCurrent
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.DocumentDestroyed

Thanks,
Simon

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8712
  • AKA Daniel
Re: Bricscad && .NET
« Reply #142 on: October 18, 2010, 07:54:38 AM »
I tested GetWorkingDatabasePtr with acdbSaveAs2000, acdbDxfOutAs2004 and acdbGetCurVportId :

- acdbSaveAs2000, acdbDxfOutAs2004 retun eFileAccessErr
-adjustAlignment retun eNotHandled
- acdbGetCurVportId seems to work

And... acdbTextFind does not exist. I was wrong :oops:


And a question:
Is it possible to execute code when loading an assembly?, As in autocad with IExtensionApplication.Initialize (or delphi dll's with DLL_PROCESS_ATTACH), but without using IExtensionApplication.

If it is possible: how?

Thanks.

No, IExtensionApplication.Initialize is not coded. I had planned to add something similar, but at this point I suspect a more official version is around the corner. There is probably an event you can capture from the framework, maybe AssemblyLoadEventHandler?

FYI acdbGetCurVportId is already wrapped @ RxNet.RxGlobal.GlobalFunctions.GetCurViewportObjectId()
If you need a simple static function wrapped. let me know, as some of these will be usable in the future

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8712
  • AKA Daniel
Re: Bricscad && .NET
« Reply #143 on: October 18, 2010, 08:10:34 AM »
Hi !

Are there any equivalent events in BricsCAD to the following AutoCAD events?

Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.DocumentBecameCurrent
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.DocumentDestroyed

Thanks,
Simon

Huh! I don't see those  :-o  hmmm let me think abou this.

SimonPapadopoulos

  • Guest
Re: Bricscad && .NET
« Reply #144 on: October 19, 2010, 03:18:42 AM »
Hi Daniel,

I use these events (DocumentBecameCurrent,DocumentDestroyed) in AutoCAD to update a Palette
when I select an other document or close the current document in the MDI interface.

In BricsCAD .NET are there any palette/paletteset classes? Ι think not.
So I want these events to update a modeless form with the current document's data when a user clicks another document or closes the
current doument in the MDI interface.

I hope that this info helps,
Simon

jgr

  • Guest
Re: Bricscad && .NET
« Reply #145 on: October 19, 2010, 03:57:30 AM »
I use these events (DocumentBecameCurrent,DocumentDestroyed) in AutoCAD to update a Palette
when I select an other document or close the current document in the MDI interface.

You can subclass the MDIClient. (WM_MDIDESTROY, WM_MDICREATE ... messages).

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8712
  • AKA Daniel
Re: Bricscad && .NET
« Reply #146 on: October 19, 2010, 09:42:12 AM »

you might be able to poll one of these
document.BeginClose;
document.BeginDocClose;
...
application.SysVarChanged;


application.SysVarChanged might be useful as I think there is a system var for the current document.

sorry, no wrappers for palettes

jgr

  • Guest
Re: Bricscad && .NET
« Reply #147 on: October 19, 2010, 10:23:55 AM »
Anyone still using .NET 2.0.. can I drop it?

I still use it, but I can use 4.0.

FYI acdbGetCurVportId is already wrapped @ RxNet.RxGlobal.GlobalFunctions.GetCurViewportObjectId()
If you need a simple static function wrapped. let me know, as some of these will be usable in the future

Sorry.

Thank you very much.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8712
  • AKA Daniel
Re: Bricscad && .NET
« Reply #148 on: October 20, 2010, 08:25:12 PM »
Anyone still using .NET 2.0.. can I drop it?

I still use it, but I can use 4.0.

FYI acdbGetCurVportId is already wrapped @ RxNet.RxGlobal.GlobalFunctions.GetCurViewportObjectId()
If you need a simple static function wrapped. let me know, as some of these will be usable in the future

Sorry.

Thank you very much.


No problem, I will keep it updated as long as people are using it  :-)

FYI, I have updated the modules to support Bricscad V11
 

Helios

  • Guest
Re: Bricscad && .NET
« Reply #149 on: October 21, 2010, 03:31:33 AM »
Daniel,

I was just about to drop you line regarding V11, but it seems I was already way to late... :lmao:

Thanks,
Arno

(Leaves me more time to check out TST, LKF... greez from HKG)