Author Topic: Some functions that I need to use with Bricscad  (Read 2697 times)

0 Members and 1 Guest are viewing this topic.

michiel

  • Guest
Some functions that I need to use with Bricscad
« on: March 30, 2012, 05:51:51 AM »
Hi,

I'm moving my AutoCAD .net code to BricsCAD code, now there are some problems:

- PromptSaveFileOptions ps = new PromptSaveFileOptions("save the drawing");
- PromptOpenFileOptions ps = new PromptOpenFileOptions("select the drawing");
- TransientManager.CurrentTransientManager.AddTransient();

These functions are not available in BricsCAD, are there some other methods to implement these functions?

« Last Edit: March 30, 2012, 05:55:46 AM by michiel »

exmachina

  • Guest
Re: Some functions that I need to use with Bricscad
« Reply #1 on: April 02, 2012, 11:54:40 AM »
I think not.
Some methods of the graphical sub-system can be replaced with the functions of the Teigha library. But my knowledge is limited about it. And the "Teigha" library used in Bricscad seems to have many bugs.

And of course: Sorry, but i do not speack english.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8846
  • AKA Daniel
Re: Some functions that I need to use with Bricscad
« Reply #2 on: April 06, 2012, 07:42:14 PM »
I think not.
Some methods of the graphical sub-system can be replaced with the functions of the Teigha library. But my knowledge is limited about it. And the "Teigha" library used in Bricscad seems to have many bugs.

And of course: Sorry, but i do not speack english.

Actually, I don't think this is the case. I mostly use BRX but when I have used their .NET I found it quite stable, caveat it's still in progress, thus missing classes.  If you do find a bug, then you should report it : )

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8846
  • AKA Daniel
Re: Some functions that I need to use with Bricscad
« Reply #3 on: April 06, 2012, 07:43:06 PM »
Hi,

I'm moving my AutoCAD .net code to BricsCAD code, now there are some problems:

- PromptSaveFileOptions ps = new PromptSaveFileOptions("save the drawing");
- PromptOpenFileOptions ps = new PromptOpenFileOptions("select the drawing");
- TransientManager.CurrentTransientManager.AddTransient();

These functions are not available in BricsCAD, are there some other methods to implement these functions?

You may be able to use the Bricscad.Windows.OpenFileDialog & SaveFileDialog directly. TransientManager is not implemented

exmachina

  • Guest
Re: Some functions that I need to use with Bricscad
« Reply #4 on: April 07, 2012, 05:00:40 PM »

Actually, I don't think this is the case. I mostly use BRX but when I have used their .NET I found it quite stable, caveat it's still in progress, thus missing classes.  If you do find a bug, then you should report it : )
At this moment I remember this. For me, This does not work:
CurveCurveIntersector2d.NumberOfIntersectionPoints

@DocumentManager.DocumentLockModeChanged -> DocumentLockModeChangedEventArgs.Veto()

I guess you said that I had to report it to Bricscad. But if can't directly download their SDK and  I do not like their updates system  and I do not like their system to report error ... i do not report...
But i need bcad :ugly:

Editor.GetCurrentView seems that can be replaced by this code:

Code: [Select]
public static AbstractViewTableRecord GetCurrentView(Database database) {
      DBObject pVpObj = active_viewport_id(database).GetObject(OpenMode.ForRead);
      return (AbstractViewTableRecord)pVpObj;
 }

public static ObjectId active_viewport_id(Database database) {
      if(database.TileMode) {
          return database.CurrentViewportTableRecordId;
      } else {
          using(BlockTableRecord paperBTR = (BlockTableRecord)database.CurrentSpaceId.GetObject(OpenMode.ForRead)) {
              Layout l = (Layout)paperBTR.LayoutId.GetObject(OpenMode.ForRead);
              return l.CurrentViewportId;
           }
      }
  }
« Last Edit: April 07, 2012, 05:07:32 PM by exmachina »