.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: Multiple acdbmgd & acmgd references ?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-27-2009 12:34 AM in reply to:
*C Witt
good thinking on using extension methods for version compatibility...
I've been using the #if conditional directive, and then build with different constants defined, according to versions... Works too, but I like this solution a lot more!
Time to review some of my code
I've been using the #if conditional directive, and then build with different constants defined, according to versions... Works too, but I like this solution a lot more!
Time to review some of my code
*Terry W. Dotson
Re: Multiple acdbmgd & acmgd references ?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-27-2009 06:45 AM in reply to:
*C Witt
Tony Tanzillo wrote:
> Rather than branching once when the code loads, your so-called
> solution branches every single time the property's value is needed.
The example was when I first discovered the alternative, and was not
intended to be optimized. I later changed it to preset the string
variable on loading to avoid the branches.
CallByName(AddEnt, StyPrp, CallType.Set, StyRec.ObjectId)
What is "astounding" is that it took you almost 24 hours to criticize.
Terry
> Rather than branching once when the code loads, your so-called
> solution branches every single time the property's value is needed.
The example was when I first discovered the alternative, and was not
intended to be optimized. I later changed it to preset the string
variable on loading to avoid the branches.
CallByName(AddEnt, StyPrp, CallType.Set, StyRec.ObjectId)
What is "astounding" is that it took you almost 24 hours to criticize.
Terry
*Tony Tanzillo
Re: Multiple acdbmgd & acmgd references ?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-27-2009 02:15 PM in reply to:
*C Witt
>> What is "astounding" is that it took you almost 24 hours to criticize.
Nothing astounding about that, it's a side-effect of being busy.
{quote}
The example was when I first discovered the alternative, and was not
intended to be optimized. I later changed it to preset the string
variable on loading to avoid the branches.
{quote}
Duh.
It still isn't 'optimized'.
Perhaps if you better understood the API you're using, you might understand
why there is a difference between caching a property name in a string, and
caching the PropertyInfo object returned by the reflection search for the
name.
Unfortunately I have other things things to do and can't really afford to
take the time to tutor you in the finer points of using reflection or
late-binding overhead, but feel free to visit the Microsoft newsgroups and
ask them to tell you more about it.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com
Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.ht m
"Terry W. Dotson" wrote in message
news:6150674@discussion.autodesk.com...
Tony Tanzillo wrote:
Nothing astounding about that, it's a side-effect of being busy.
{quote}
The example was when I first discovered the alternative, and was not
intended to be optimized. I later changed it to preset the string
variable on loading to avoid the branches.
{quote}
Duh.
It still isn't 'optimized'.
Perhaps if you better understood the API you're using, you might understand
why there is a difference between caching a property name in a string, and
caching the PropertyInfo object returned by the reflection search for the
name.
Unfortunately I have other things things to do and can't really afford to
take the time to tutor you in the finer points of using reflection or
late-binding overhead, but feel free to visit the Microsoft newsgroups and
ask them to tell you more about it.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com
Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.ht
"Terry W. Dotson"
news:6150674@discussion.autodesk.com...
Tony Tanzillo wrote:
*Terry W. Dotson
Re: Multiple acdbmgd & acmgd references ?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-27-2009 03:09 PM in reply to:
*C Witt
Tony Tanzillo wrote:
> ... can't really afford to take the time to tutor you ...
All well and good as I didn't ask for (or need) your help.
Terry
> ... can't really afford to take the time to tutor you ...
All well and good as I didn't ask for (or need) your help.
Terry
Re: Multiple acdbmgd & acmgd references ?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-27-2012 04:26 AM in reply to:
*Tony Tanzillo
Hi. can you explain how to use you code in VS2010 express? (If i can.) I have many acad version 2009, 2010 and 2012
I dont know how to manage all this version... I want build only one DDL (if i can).
I dont know how to manage VS2010 exp for not check a part of my code.
My think :
Try
'v autocad 2010
DBTexte.TextStyleID =....
catch ex as exception
'v autocad 2009
DBTexte.TextStyle = ...
end try.
if a build with dll from autocad 2009 i have error for .TextStyleId and for autocad 2010 .textStyle
so ....
Thx


