Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
.NET
»
Topic:
ApplicationServices.Application VS ApplicationServices.Core.Application
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: ApplicationServices.Application VS ApplicationServices.Core.Application (Read 2999 times)
0 Members and 1 Guest are viewing this topic.
kdub_nz
Mesozoic keyThumper
SuperMod
Water Moccasin
Posts: 1898
class keyThumper<T>:ILazy<T>
ApplicationServices.Application VS ApplicationServices.Core.Application
«
on:
November 19, 2022, 05:11:59 PM »
Going through some of my older code :
I'm finding I have various Alias declarations for AcadApp :-
Code - C#:
[Select]
using
AcadApp
=
Autodesk
.
AutoCAD
.
ApplicationServices
.
Core
.
Application
;
and
Code - C#:
[Select]
using
AcadApp
=
Autodesk
.
AutoCAD
.
ApplicationServices
.
Application
;
I have a preference for the
ApplicationServices.Core.Application
simply because it's the base class for
ApplicationServices.Application
. . . but I'm wondering if it really makes a difference either way.
Has anyone done any research on this, or have a reasoned opinion ??
Logged
Called Kerry in my other life
Retired; but they dragged me back in !
I live at UTC + 13.00
some people complain about loading the dishwasher
Sometimes the question is more important than the answer.
gile
Water Moccasin
Posts: 2457
Marseille, France
WWW
Re: ApplicationServices.Application VS ApplicationServices.Core.Application
«
Reply #1 on:
November 20, 2022, 02:24:39 AM »
Hi,
I would tend to use :
Code - C#:
[Select]
using
AcAp
=
Autodesk
.
AutoCAD
.
ApplicationServices
.
Application
;
because the Autodesk.AutoCAD.ApplicationServices.Core.Application class does not expose some methods I commonly use such as ShowModal.Dialog which warrants an alias to avoid confusion with System.Windows.Forms.Application.
I don't think using ApplicationServices.Application where one could use ApplicationServices.Core.Application has any real impact on code execution.
But we can also use two aliases:
Code - C#:
[Select]
using
AcAp
=
Autodesk
.
AutoCAD
.
ApplicationServices
.
Application
;
using
AcCoreAp
=
Autodesk
.
AutoCAD
.
ApplicationServices
.
Core
.
Application
;
Logged
Speaking English as a French Frog
kdub_nz
Mesozoic keyThumper
SuperMod
Water Moccasin
Posts: 1898
class keyThumper<T>:ILazy<T>
Re: ApplicationServices.Application VS ApplicationServices.Core.Application
«
Reply #2 on:
November 20, 2022, 02:38:14 AM »
Hi Gilles,
Sitting outside in the sunshine this afternoon I decided to go not us the Core.Application.
As you say, I too think the impact either way will be minimal.
I'll save my worrying for important things.
Logged
Called Kerry in my other life
Retired; but they dragged me back in !
I live at UTC + 13.00
some people complain about loading the dishwasher
Sometimes the question is more important than the answer.
It's Alive!
Retired
Needs a day job
Posts: 8402
AKA Daniel
WWW
Re: ApplicationServices.Application VS ApplicationServices.Core.Application
«
Reply #3 on:
November 20, 2022, 03:09:20 AM »
I concur
I also dropped coding this morning to go out in the sunshine. Went to Singapore’s botanic garden
«
Last Edit: November 20, 2022, 03:13:20 AM by It's Alive!
»
Logged
https://github.com/CEXT-Dan/PyRx
https://pyarx.blogspot.com/
n.yuan
Bull Frog
Posts: 344
Re: ApplicationServices.Application VS ApplicationServices.Core.Application
«
Reply #4 on:
November 20, 2022, 09:17:19 AM »
Well, if you write code that is generally intent to be shared by possible core console/Forge (now, called Platform), you may want to make sure you only use ...Core.Application, because you do not use acmgd.dll in plugins for core console/Forge.
Logged
kdub_nz
Mesozoic keyThumper
SuperMod
Water Moccasin
Posts: 1898
class keyThumper<T>:ILazy<T>
Re: ApplicationServices.Application VS ApplicationServices.Core.Application
«
Reply #5 on:
November 20, 2022, 03:10:27 PM »
Thanks Norman, I'll keep that in mind.
Regards,
Logged
Called Kerry in my other life
Retired; but they dragged me back in !
I live at UTC + 13.00
some people complain about loading the dishwasher
Sometimes the question is more important than the answer.
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
.NET
»
Topic:
ApplicationServices.Application VS ApplicationServices.Core.Application