Author Topic: CommandLine Class (Tonys)  (Read 14794 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
CommandLine Class (Tonys)
« on: April 15, 2007, 10:37:55 AM »
I've been having a look at Tony's CommandLine class ;

Can someone who's familiar give me a hand please.
I've added using System.Collections; Namespace for the Hashtable class references .. I assume that's correct ?

The bit in the attached piccy has me stumped.
Part of the problem may be that I've never played with Hashtables, but the compiler errors have me scratching my head.

I'll just attach the relevant part .. Any Ideas ??

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: CommandLine Class (Tonys)
« Reply #1 on: April 15, 2007, 11:00:41 AM »
is this a constructor where the class name is Commands? I can't see the class name from your pic
ps where can I see the whole class?
« Last Edit: April 15, 2007, 11:03:54 AM by Danielm103 »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: CommandLine Class (Tonys)
« Reply #2 on: April 15, 2007, 11:04:56 AM »
Hi Daniel,
The ClassName is CommandLine

I'm reticent about posting the class ..
You'll find it here. http://www.caddzone.com/CommandLine.cs

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: CommandLine Class (Tonys)
« Reply #3 on: April 15, 2007, 11:15:26 AM »
We’d probably better ask the boss but since there is no “return type”
I would say it’s a constructor and should be renamed CommandLine….
But But.. I really have no idea sorry for butting in..     ^-^

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: CommandLine Class (Tonys)
« Reply #4 on: April 15, 2007, 11:19:43 AM »
don't be sorry, I'm glad to have someone sane to talk with at this hour of the night .. :D
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

LE

  • Guest
Re: CommandLine Class (Tonys)
« Reply #5 on: April 15, 2007, 01:17:05 PM »
To make it work do the following:

Quote
static Commands()

Change to:

Quote
static void Commands()

or you can make your Hashtable inside of TypedValueFromObject() like:

Quote
static TypedValue TypedValueFromObject(Object val)
{
    Hashtable ResTypes = new Hashtable();
    ResTypes.Clear();
// with the following too or as it is in the original below
    ////ResTypes.Add(typeof(string), RTSTR);
    ////ResTypes.Add(typeof(double), RTREAL);
    ////ResTypes.Add(typeof(Point3d), RT3DPOINT);
    ////ResTypes.Add(typeof(ObjectId), RTENAME);
    ////ResTypes.Add(typeof(Int32), RTLONG);
    ////ResTypes.Add(typeof(Int16), RTSHORT);
    ////ResTypes.Add(typeof(Point2d), RTPOINT);
    ResTypes[typeof(string)] = RTSTR;
    ResTypes[typeof(double)] = RTREAL;
    ResTypes[typeof(Point3d)] = RT3DPOINT;
    ResTypes[typeof(ObjectId)] = RTENAME;
    ResTypes[typeof(Int32)] = RTLONG;
    ResTypes[typeof(Int16)] = RTSHORT;
    ResTypes[typeof(Point2d)] = RTPOINT;

    object o = ResTypes[val.GetType()];

    if (o == null)
        throw new InvalidOperationException("Unsupported type in Command() method");
    return new TypedValue(o.GetHashCode(), val); //((int)o, val);
}

And as the code above use GetHashCode() instead of the (int) cast.
« Last Edit: April 15, 2007, 01:18:13 PM by LE »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: CommandLine Class (Tonys)
« Reply #6 on: April 15, 2007, 05:00:23 PM »
Thanks for the comments Luis.

One issue with assuming it's a void method is that it never gets called from inside the class .. so the hashtable would never get filled, unless I misunderstand what's happening .. which IS likely.

How efficient would it be clearing and reloading the hashtable for each call to TypedValueFromObject ?
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

LE

  • Guest
Re: CommandLine Class (Tonys)
« Reply #7 on: April 15, 2007, 05:42:19 PM »
Thanks for the comments Luis.

One issue with assuming it's a void method is that it never gets called from inside the class .. so the hashtable would never get filled, unless I misunderstand what's happening .. which IS likely.

How efficient would it be clearing and reloading the hashtable for each call to TypedValueFromObject ?

I tried to use the code as-is and simple was adding a line in:

Quote
        public static int Command(params object[] args)           
        {
            Commands();
...

But, it gets filled every time is called, so that's why I used, what I have done in some of my functions, since the hashtable is being clear every time before is filled, and it is a very simple one, I don't think there is a overhead, but wait for the masters...
« Last Edit: April 15, 2007, 06:44:21 PM by LE »

LE

  • Guest
Re: CommandLine Class (Tonys)
« Reply #8 on: April 15, 2007, 07:00:11 PM »
I tested also by using the following to avoid the Clear() call

Code: [Select]
if (ResTypes.Count == 0)
{
    //ed.WriteMessage("\nEmpty ResTypes HatchTable!");
    ResTypes[typeof(string)]    = RTSTR;
    ResTypes[typeof(double)]    = RTREAL;
    ResTypes[typeof(Point3d)]   = RT3DPOINT;
    ResTypes[typeof(ObjectId)]  = RTENAME;
    ResTypes[typeof(Int32)]     = RTLONG;
    ResTypes[typeof(Int16)]     = RTSHORT;
    ResTypes[typeof(Point2d)]   = RTPOINT;
    //ed.WriteMessage("\nHatchTable count is {0}", ResTypes.Count);
}

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: CommandLine Class (Tonys)
« Reply #9 on: April 15, 2007, 08:30:24 PM »
How efficient would it be clearing and reloading the hashtable for each call to TypedValueFromObject ?

Correct, that’s why I still think it’s a static constructor.
The static constructor and the static hashtable would be initialized upon loading of the class. Correct?

LE

  • Guest
Re: CommandLine Class (Tonys)
« Reply #10 on: April 15, 2007, 08:58:11 PM »
Yes...

For doing that, change:

Quote
static void Commands()

To:
Quote
public CommandLine()

And test the class again... btw, the use of Clear() is not bad sample at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: CommandLine Class (Tonys)
« Reply #11 on: April 15, 2007, 09:15:53 PM »
I think that would be incorrect Luis, as only a static constructor initializes its object upon loading of the assembly

Change
 
Code: [Select]
static Commands() to
 
Code: [Select]
static CommandLine() ,
if you need to make another instance, you would need to add a public to the non static constructor the methods are static

Code: [Select]
public class myClass
{
  public myClass()
  {
    // Constructor.
  }
  static myClass()
  {
    // Initialization code goes here.
    // Can only access static members here.
  }
  //...
}
« Last Edit: April 15, 2007, 09:32:03 PM by Danielm103 »

LE

  • Guest
Re: CommandLine Class (Tonys)
« Reply #12 on: April 15, 2007, 09:24:59 PM »
I am using the arx wizard and was following the default constructors it creates, but I checked with the static and works too, here is the class modified.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: CommandLine Class (Tonys)
« Reply #13 on: April 15, 2007, 09:30:17 PM »
Great, you didn’t need to comment the first constructor.
It would not be the same as constructor overloading.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: CommandLine Class (Tonys)
« Reply #14 on: April 15, 2007, 11:43:31 PM »
Thanks guys ..I made some time to test this.

I believe you were correct first time Daniel ..
I made it a static constructor ;
static CommandLine()
{
...
}

and

changed
return new TypedValue((int) o, val)
to
return new TypedValue(Convert.ToInt32(o), val);
because of a casting error ..

and got back to where I started .. loading a CUI menu ..
Code: [Select]
        //
        //
        [CommandMethod("Test_ZE")]
        public void test_ze()
        {
            CommandLine.ZoomExtents();
        }
        [CommandMethod("Test_LoadDbCUI")]
        public void test_Laconic()
        {
           string MenuQualifiedName = "K:\\DbCon.cui";
           string MenuGroupName = "DBCONNECT";
           CommandLine.Command(
                "FileDia", "0",
                "CuiUnLoad", MenuGroupName,
                "CuiLoad", MenuQualifiedName,
                "FileDia", "1"
                );
        }

.. and thanks to Tony for the original.


Quote
Command: Test_LoadDbCUI
Customization file unloaded successfully. Customization Group: DBCONNECT
Customization file loaded successfully. Customization Group: DBCONNECT
Command:

DUH: fat finger spelling !
« Last Edit: April 16, 2007, 12:59:59 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: CommandLine Class (Tonys)
« Reply #15 on: April 16, 2007, 12:50:41 AM »
From a quick read, the 'static Commandline()' method is not actually a constructor in the sense we know of.

The constructor is defined as an instance initializer which is named .ctor in the IL. 

The 'static Commanline()' is a type initializer which is named .cctor in the IL. Type initializers are called static constructors in the C++/CLI and C# languages.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: CommandLine Class (Tonys)
« Reply #16 on: April 16, 2007, 02:58:46 AM »
Neato, I learned something new today   :-D

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: CommandLine Class (Tonys)
« Reply #17 on: April 16, 2007, 03:04:14 AM »
Neato, I learned something new today   :-D

:-D
I've had a good day in that regard as well !
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

TonyT

  • Guest
Re: CommandLine Class (Tonys)
« Reply #18 on: April 17, 2007, 12:10:40 AM »
Hi Luis.

The Command() method is supposed to be
the static contstructor, but I changed the
name of the class at the last minute, and
forget to also change the name of this too.

To make it work do the following:

Quote
static Commands()

Change to:

Quote
static void Commands()

or you can make your Hashtable inside of TypedValueFromObject() like:

Quote
static TypedValue TypedValueFromObject(Object val)
{
    Hashtable ResTypes = new Hashtable();
    ResTypes.Clear();
// with the following too or as it is in the original below
    ////ResTypes.Add(typeof(string), RTSTR);
    ////ResTypes.Add(typeof(double), RTREAL);
    ////ResTypes.Add(typeof(Point3d), RT3DPOINT);
    ////ResTypes.Add(typeof(ObjectId), RTENAME);
    ////ResTypes.Add(typeof(Int32), RTLONG);
    ////ResTypes.Add(typeof(Int16), RTSHORT);
    ////ResTypes.Add(typeof(Point2d), RTPOINT);
    ResTypes[typeof(string)] = RTSTR;
    ResTypes[typeof(double)] = RTREAL;
    ResTypes[typeof(Point3d)] = RT3DPOINT;
    ResTypes[typeof(ObjectId)] = RTENAME;
    ResTypes[typeof(Int32)] = RTLONG;
    ResTypes[typeof(Int16)] = RTSHORT;
    ResTypes[typeof(Point2d)] = RTPOINT;

    object o = ResTypes[val.GetType()];

    if (o == null)
        throw new InvalidOperationException("Unsupported type in Command() method");
    return new TypedValue(o.GetHashCode(), val); //((int)o, val);
}

And as the code above use GetHashCode() instead of the (int) cast.
« Last Edit: April 17, 2007, 12:17:22 AM by TonyT »

TonyT

  • Guest
Re: CommandLine Class (Tonys)
« Reply #19 on: April 17, 2007, 12:16:20 AM »
Sorry all, I renamed the class at the last minute, from
'Commands' to 'CommandLine', and forget to rename
the static constructor.

:-o

Thanks to Kerry for stumbling over that, as I didn't
know that it was broken.

Updated verison .cs and .vb versions are on my
website now, and hopefully they work.

Thanks guys ..I made some time to test this.

I believe you were correct first time Daniel ..
I made it a static constructor ;
static CommandLine()
{
...
}

and

changed
return new TypedValue((int) o, val)
to
return new TypedValue(Convert.ToInt32(o), val);
because of a casting error ..

and got back to where I started .. loading a CUI menu ..
Code: [Select]
        //
        //
        [CommandMethod("Test_ZE")]
        public void test_ze()
        {
            CommandLine.ZoomExtents();
        }
        [CommandMethod("Test_LoadDbCUI")]
        public void test_Laconic()
        {
           string MenuQualifiedName = "K:\\DbCon.cui";
           string MenuGroupName = "DBCONNECT";
           CommandLine.Command(
                "FileDia", "0",
                "CuiUnLoad", MenuGroupName,
                "CuiLoad", MenuQualifiedName,
                "FileDia", "1"
                );
        }

.. and thanks to Tony for the original.


Quote
Command: Test_LoadDbCUI
Customization file unloaded successfully. Customization Group: DBCONNECT
Customization file loaded successfully. Customization Group: DBCONNECT
Command:

DUH: fat finger spelling !

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: CommandLine Class (Tonys)
« Reply #20 on: April 17, 2007, 12:53:15 AM »
Thanks for confirming that Tony.

I notice you've changed the TypedValueFromObject method to more refined code.

I'm still getting an InvalidCastException using the (int).... cast though.
When I use the Convert.ToInt32(ResTypes[t]) the methos executes without a qualm.

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

TonyT

  • Guest
Re: CommandLine Class (Tonys)
« Reply #21 on: April 17, 2007, 10:37:29 AM »
Thanks again. 

The only change I needed to make was to change the
cast from (int) to (short).

I posted an updated version that should work now.

Thanks for confirming that Tony.

I notice you've changed the TypedValueFromObject method to more refined code.

I'm still getting an InvalidCastException using the (int).... cast though.
When I use the Convert.ToInt32(ResTypes[t]) the methos executes without a qualm.



LE

  • Guest
Re: CommandLine Class (Tonys)
« Reply #22 on: April 17, 2007, 10:41:55 AM »
Thanks again. 

The only change I needed to make was to change the
cast from (int) to (short).

I posted an updated version that should work now.

Have not seen your updated code Tony, but before knowing the previous code status, I added the use of GetHashCode() in your TypedValueFromObject() function and the function samples were working without any
exceptions, in this case it is better to use the cast?

Thanks.

TonyT

  • Guest
Re: CommandLine Class (Tonys)
« Reply #23 on: April 18, 2007, 02:16:37 AM »
Luis - Sorry, but I'm not really sure I understand what
you mean by 'use of GetHashCode()'...

Perhaps you can post the subject code and
it might be clearer.


Thanks again. 

The only change I needed to make was to change the
cast from (int) to (short).

I posted an updated version that should work now.

Have not seen your updated code Tony, but before knowing the previous code status, I added the use of GetHashCode() in your TypedValueFromObject() function and the function samples were working without any
exceptions, in this case it is better to use the cast?

Thanks.

TonyT

  • Guest
Re: CommandLine Class (Tonys)
« Reply #24 on: April 18, 2007, 03:41:32 AM »
Out of what transpired in a thread on Autodesk's .NET
newsgroup, I made a minor enhancement to this class,
that allows you to set a static property, that when set
to true, causes the Command() method to automatically
insert "_non" into the command list, in front of Point3d
or Point2d arguments, to supress running osnaps.

I posted the update just now

Thanks for confirming that Tony.

I notice you've changed the TypedValueFromObject method to more refined code.

I'm still getting an InvalidCastException using the (int).... cast though.
When I use the Convert.ToInt32(ResTypes[t]) the methos executes without a qualm.



Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: CommandLine Class (Tonys)
« Reply #25 on: April 18, 2007, 05:15:07 AM »
Yes, I noticed that thread this morning.
I was thinking at the time that all thats needed now is nil and T  :-)

Thanks again Tony, this has been a good educator.
« Last Edit: April 18, 2007, 05:22:46 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

LE

  • Guest
Re: CommandLine Class (Tonys)
« Reply #26 on: April 18, 2007, 10:45:50 AM »
Luis - Sorry, but I'm not really sure I understand what
you mean by 'use of GetHashCode()'...

Perhaps you can post the subject code and
it might be clearer.

This one Tony;

In your previous code I tested with:

Code: [Select]
static TypedValue TypedValueFromObject(Object val)
{
    object o = ResTypes[val.GetType()];
    if (o == null)
        throw new InvalidOperationException("Unsupported type in Command() method");
   return new TypedValue(o.[color=blue]GetHashCode[/color](), val); //((int)o, val); <<====
 }

And your class works without a problem (testing the functions you have as sample there).

Thanks!

TonyT

  • Guest
Re: CommandLine Class (Tonys)
« Reply #27 on: April 18, 2007, 08:53:28 PM »
Luis - We don't use GetHashCode() to convert an object
to an integer type, we use typecasting or Convert.

My code works fine if the cast is to (short) rather than (int).

Luis - Sorry, but I'm not really sure I understand what
you mean by 'use of GetHashCode()'...

Perhaps you can post the subject code and
it might be clearer.

This one Tony;

In your previous code I tested with:

Code: [Select]
static TypedValue TypedValueFromObject(Object val)
{
    object o = ResTypes[val.GetType()];
    if (o == null)
        throw new InvalidOperationException("Unsupported type in Command() method");
   return new TypedValue(o.[color=blue]GetHashCode[/color](), val); //((int)o, val); <<====
 }

And your class works without a problem (testing the functions you have as sample there).

Thanks!

LE

  • Guest
Re: CommandLine Class (Tonys)
« Reply #28 on: April 18, 2007, 09:15:43 PM »
Quote
We don't use GetHashCode() to convert an object
to an integer type, we use typecasting or Convert.

My code works fine if the cast is to (short) rather than (int).

Thank you Tony

It make sense now... strange that was working here, but now I get it... :)

TonyT

  • Guest
Re: CommandLine Class (Tonys)
« Reply #29 on: April 19, 2007, 08:40:05 AM »
Just updated it again.

Another 'enhancement' is that it can automatically
transform coordinate input from WCS to current UCS.

Yes, I noticed that thread this morning.
I was thinking at the time that all thats needed now is nil and T  :-)

Thanks again Tony, this has been a good educator.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: CommandLine Class (Tonys)
« Reply #30 on: August 07, 2010, 04:58:10 PM »
Here I am, 3 years later, just now needing to use this Class of Tony's. First I'd like to say thanks to Tony for making this code available. It works fine, except for the full context that I would like for it to....

Background, Civil3D makes renumbering Curve/Line/Spiral Tag labels a slow and cumbersome task, especially if one wants to renumber matching items to the same number. For instance, my line labels L1, L5, L6, and L12 all have the same bearing & length so I want to renumber all of them to L1. This cannot currently be done using the C3D API's, at least not that I've yet discovered, so I'm using the "EditTagLabels" C3D command and Tony's code to call it.

2 issues I've run into, that I'm not sure how to fix. First is that the edited label's display does not update until after my command ends, which makes it difficult to keep track of which labels have already been changed.

Second, and more of a problem, is that the "EditTagLabels" prompts changes when the new number duplicates an existing number. Which means I need to provide an extra response for the command when a duplicate is found (which will be most of the time, but I still need to account for both scenarios). Is there a way to accommodate for this? These are the 2 lines that I somehow need to be just 1 that works in either case:
Code: [Select]
CaddZone.ApplicationServices.CommandLine.Command("EditTagNumbers", entRes.PickedPoint, "");
CaddZone.ApplicationServices.CommandLine.Command("EditTagNumbers", entRes.PickedPoint, "c", "");
The biggest hurdle is that I have no way of determining before the command is run which numbers are already in use.

Any hints on either one, or both, of these issues would be greatly appreciated.

Jeff

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: CommandLine Class (Tonys)
« Reply #31 on: August 07, 2010, 05:18:57 PM »
As usual, as soon as I post a question I manage to solve at least a portion of it within minutes....the first problem of the labels not updating was solved by changing where I start/commit the transaction. And now that I can see the labels change, I see that the code still works whether the number exists or not, it just is throwing up a warning that gets bypassed.....

So, it all appears to be working fine now.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: CommandLine Class (Tonys)
« Reply #32 on: August 07, 2010, 07:39:03 PM »

That happens to me a lot
.. it's the reason I usually sleep on problems before posting .. I think resolving has something to do with verbalising the issue.

I noticed this from Tony last night ,,, looks interesting
http://forums.autodesk.com/t5/NET/New-Sample-Application-Defined-System-Variables/m-p/2738909#U2738909
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: CommandLine Class (Tonys)
« Reply #33 on: August 07, 2010, 08:09:10 PM »

I noticed this from Tony last night ,,, looks interesting
http://forums.autodesk.com/t5/NET/New-Sample-Application-Defined-System-Variables/m-p/2738909#U2738909

Yes it does, thanks for making note of it here.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: CommandLine Class (Tonys)
« Reply #34 on: August 11, 2010, 06:56:27 AM »

You're welcome Jeff :)

another one of Tony's which I'll reference since he hasn't visited here much recently.

ExtensionApplicationInfo.zip
in this thread :
http://forums.autodesk.com/t5/NET/Netload-help/m-p/2736243/highlight/true#M20202
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: CommandLine Class (Tonys)
« Reply #35 on: August 11, 2010, 12:23:56 PM »

That happens to me a lot
.. it's the reason I usually sleep on problems before posting .. I think resolving has something to do with verbalising the issue.

I noticed this from Tony last night ,,, looks interesting
http://forums.autodesk.com/t5/NET/New-Sample-Application-Defined-System-Variables/m-p/2738909#U2738909


Goes bang. 'Autodesk.AutoCAD.Runtime.Variable' does not contain a definition for 'StorageType' is just one of the compile errors.
Anyone else?

Win 7 Pro x64
AutoCAD 2010 x64
VC# 2008 Express
Linked against 2010\inc-x64 SDK

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: CommandLine Class (Tonys)
« Reply #36 on: August 11, 2010, 02:13:03 PM »

Goes bang. 'Autodesk.AutoCAD.Runtime.Variable' does not contain a definition for 'StorageType' is just one of the compile errors.
Anyone else?

Win 7 Pro x64
AutoCAD 2010 x64
VC# 2008 Express
Linked against 2010\inc-x64 SDK
It builds fine for 2011, but I get the same results as you with 2010.

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: CommandLine Class (Tonys)
« Reply #37 on: August 11, 2010, 02:20:15 PM »
If I remember the API webcast correctly, they were in place but not enabled for the 2010 release.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}