.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Code compatibility

3 REPLIES 3
Reply
Message 1 of 4
_gile
514 Views, 3 Replies

Code compatibility

Hi,

Playing with custom osnaps, I discover some changes in the Glyph class between 2007 and 2010 versions.
With 2007, a class which inherits Glyph have to implement ViewportDraw(), with 2010 SubViewportDraw().

2007
{code}public override void ViewportDraw(ViewportDraw vd){code}

2010
{code}protected override void SubViewportDraw(ViewportDraw vd){code}

I solved the problem making two versions, but is there a way to have a single version in which, according to the current AutoCAD version, one or the other method is called (may be using a delegate) ?


Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: _gile

In 2010, I don't see a SubViewportDraw(), but do see a SubWorldDraw().



--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

<_gile> wrote in message news:6328305@discussion.autodesk.com...
Hi,

Playing with custom osnaps, I discover some changes in the Glyph class between
2007 and 2010 versions.
With 2007, a class which inherits Glyph have to implement ViewportDraw(), with
2010 SubViewportDraw().

2007
{code}public override void ViewportDraw(ViewportDraw vd){code}

2010
{code}protected override void SubViewportDraw(ViewportDraw vd){code}

I solved the problem making two versions, but is there a way to have a single
version in which, according to the current AutoCAD version, one or the other
method is called (may be using a delegate) ?
Message 3 of 4
_gile
in reply to: _gile

Hi Tony,

> In 2010, I don't see a SubViewportDraw(), but do see a SubWorldDraw().

In ObjectARX 2010 docs for managed classes (arxmgd.chm), I didn't find neither SubViewportDraw() nor SubWorldDraw(). I only found the 'old' ViewportDraw().

Seems there're both subViewportDraw() and subWorldDraw() in AcGiDrawable methods (ARX) and a viewportDraw too...

It's Visual Studio intellisense which purpose to implement the abstrct class using:
protected override void SubViewportDraw(ViewportDraw vd)

And it works fine for 2010... Edited by: _gile on Feb 2, 2010 8:03 AM


Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 4 of 4
Anonymous
in reply to: _gile

I now see that SubViewportDraw() is an abstract
member of the base class (Drawable), which explains it.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

<_gile> wrote in message news:6328458@discussion.autodesk.com...
Hi Tony,

> In 2010, I don't see a SubViewportDraw(), but do see a SubWorldDraw().

In ObjectARX 2010 docs for managed classes (arxmgd.chm), I didn't find neither
SubViewportDraw() nor SubWorldDraw(). I only found the 'old' ViewportDraw().

Seems there're both subViewportDraw() and subWorldDraw() in AcGiDrawable methods
(ARX) and a viewportDraw too...

It's Visual Studio intellisense which purpose to implement the abstrct class
using:
protected override void SubViewportDraw(ViewportDraw vd)

And it works fine for 2010...

Edited by: _gile on Feb 2, 2010 8:03 AM

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost