Author Topic: Anyone have example for changing z elevation of polyline?  (Read 10561 times)

0 Members and 1 Guest are viewing this topic.

bchapman

  • Guest
Anyone have example for changing z elevation of polyline?
« on: February 11, 2013, 02:53:40 AM »
Anyone know how to do this in c#?  I can't find any examples online. Wish vlax-put-property worked in c# lol.  Thanks!
« Last Edit: February 11, 2013, 03:26:32 AM by BC_in_NV »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Anyone have example for changing z elevation of polyline?
« Reply #1 on: February 11, 2013, 04:44:09 AM »
I'm away from a help file, but
pline.Elevation rings a bell.
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.

TheMaster

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #2 on: February 11, 2013, 12:38:51 PM »
Anyone know how to do this in c#?  I can't find any examples online. Wish vlax-put-property worked in c# lol.  Thanks!

Have a look at the docs for the Polyline class.  It has an Elevation property..

You're probably going to have to go through the basic API training materials that Autodesk provides, to learn the basics of modifying objects in .NET. Once you've done that, doing something simple like this, only requires you to look in the docs to find the relevant class, and method or property.


bchapman

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #3 on: February 11, 2013, 01:01:08 PM »
Thanks!

I'm away from a help file, but
pline.Elevation rings a bell.

BlackBox

  • King Gator
  • Posts: 3770
Re: Anyone have example for changing z elevation of polyline?
« Reply #4 on: February 11, 2013, 01:01:36 PM »
The Object Browser is your friend.
"How we think determines what we do, and what we do determines what we get."

bchapman

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #5 on: February 11, 2013, 01:05:30 PM »
Thanks TT... I needed to know the name of what I was looking for. Went through the labs and the "my first plug in" but those are developed for the slightly more aggressive programmer with some programming education it seems...

Desperately needed the method or whatever you and Kerry posted so I could find the document you are talking about. every time I search for it I pull up a thousand things I don't care about lol

Don't get me wrong... I might back track if I have to :/ My end goal is simply to get the routines I've written into C#... if I plan on programming beyond that... I may have to

Thanks!


Anyone know how to do this in c#?  I can't find any examples online. Wish vlax-put-property worked in c# lol.  Thanks!

Have a look at the docs for the Polyline class.  It has an Elevation property..

You're probably going to have to go through the basic API training materials that Autodesk provides, to learn the basics of modifying objects in .NET. Once you've done that, doing something simple like this, only requires you to look in the docs to find the relevant class, and method or property.
« Last Edit: February 11, 2013, 01:14:21 PM by BC_in_NV »

bchapman

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #6 on: February 11, 2013, 10:55:37 PM »
Thank you renderman!!! I desperately needed that.  That really should be the first thing on any lesson

The Object Browser is your friend.

bchapman

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #7 on: February 12, 2013, 03:03:38 AM »
I want to second the kudos for this comment!  Frick I needed this so much sooner :)  Thanks again RM, saved me bacon as always!

The Object Browser is your friend.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Anyone have example for changing z elevation of polyline?
« Reply #8 on: February 12, 2013, 05:03:07 AM »

 :wink:

You recently jumped on someone who you thought suggested that you go back to basics. The Object Browser is the first step for the basics .. there is no easier way to say that.

Just a general tip. The AutoCad .NET  API has evolved. Some old code is outdated. Sometimes Google is not your friend. Some old code is just horrible. Some new code is also horrible.
The only way to Tame the Beast is to make every line of code your own ( I mean understand it rationally) and to write lots of lines of code. If you're tempted to take that as condescending, don't ; it's a basic tenet of the art.

Regards

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.

bchapman

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #9 on: February 12, 2013, 05:17:45 AM »
thanks Kerry!... not sure who I jumped on but I didn't mean to... I appreciate the advice :)

The object browser helped a ton, but nothing I went through on Autodesk site even mentioned it.  Major fail :/  Wish I didn't have to but seems the only way to learn this stuff is to rely on people like you to continue to share what you've learned, and written, and hope the day doesn't come when you, and others like you, decide to stop sharing :/  There's something to be said about the satisfaction of getting a piece of code working, whether written by one self entirely, or modifying anothers to do what one would want.

This is my latest disaster... unfortunately I've not got away from CAPs yet... but I do feel I'm understanding it a little better... not much...but some....

Code: [Select]
//changes attributes integer value

namespace BCCADJUSTATTELEVATION
{
    public class DraftingTools
    {
        [CommandMethod("BCC:MAV")]
        public void Test()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            Editor ed = doc.Editor;

            PromptIntegerOptions BCCADJUST = new PromptIntegerOptions("\nEnter Amount: ");
            PromptIntegerResult BCCADJUSTMENT = ed.GetInteger(BCCADJUST);
            double BCCADJVALUE = BCCADJUSTMENT.Value;

            {

                while (0 == 0)
                    try
                    {

                        PromptSelectionResult psr = ed.GetSelection();
                        if (psr.Status != PromptStatus.OK) return;

                        using (Transaction tr = db.TransactionManager.StartTransaction())
                        {
                            // Iterate the selection set
                            foreach (ObjectId brId in psr.Value.GetObjectIds())
                            {
                                // Open the block reference
                                BlockReference br = (BlockReference)tr.GetObject(brId, OpenMode.ForRead);
                                ed.WriteMessage("\n\nBlock: {0}", br.Name);
                                // Iterate the attribute collection
                                foreach (ObjectId attId in br.AttributeCollection)
                                {
                                    // Open the attribute reference
                                    AttributeReference att = (AttributeReference)tr.GetObject(attId, OpenMode.ForWrite);
                                    ed.WriteMessage("\nOld {0} = {1} ", att.Tag, att.TextString);

                                    try
                                    {
                                        double ATTTODOUBLE = Convert.ToDouble(att.TextString);


                                        double FINALVALUE = ATTTODOUBLE + BCCADJVALUE;

                                        ed.WriteMessage("\nAdjusted {0} = {1}", att.Tag, FINALVALUE);

                                        att.TextString = FINALVALUE.ToString();
                                    }
                                    catch { ed.WriteMessage("\nOne or more attributes don't contain numbers. It was skipped :)"); }

                                }

                            }


                            tr.Commit();
                        }

                    }
                    catch { ed.WriteMessage("\nBrian Says You Escaped else Failed Horribly :P"); }
            }


        }
    }
}



 :wink:

You recently jumped on someone who you thought suggested that you go back to basics. The Object Browser is the first step for the basics .. there is no easier way to say that.

Just a general tip. The AutoCad .NET  API has evolved. Some old code is outdated. Sometimes Google is not your friend. Some old code is just horrible. Some new code is also horrible.
The only way to Tame the Beast is to make every line of code your own ( I mean understand it rationally) and to write lots of lines of code. If you're tempted to take that as condescending, don't ; it's a basic tenet of the art.

Regards
« Last Edit: February 12, 2013, 05:28:02 AM by BC_in_NV »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Anyone have example for changing z elevation of polyline?
« Reply #10 on: February 12, 2013, 08:50:03 AM »
WTF is this ??

looks like you have a displaced code block.

... and ( haven't analysed, so assume you use a break to escape this ) while true would be a more usual conditional.

Code: [Select]
            double BCCADJVALUE = BCCADJUSTMENT.Value;
                                                                                               
            {

                while (0 == 0)
                    try
                    {


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.

WILL HATCH

  • Bull Frog
  • Posts: 450
Re: Anyone have example for changing z elevation of polyline?
« Reply #11 on: February 12, 2013, 11:17:15 AM »
How's this?


Code - C#: [Select]
  1.         [CommandMethod("BCC:MAV")]
  2.         public void Test()
  3.         {
  4.             Document doc = Application.DocumentManager.MdiActiveDocument;
  5.             Database db = doc.Database;
  6.             Editor ed = doc.Editor;
  7.  
  8.             //PromptIntegerOptions BCCADJUST = new PromptIntegerOptions("\nEnter Amount: ");//<<--- since we arent specifying any options in here its redundant
  9.             //PromptIntegerResult BCCADJUSTMENT = ed.GetInteger("\nEnter Amount: ");
  10.             //double BCCADJVALUE = BCCADJUSTMENT.Value;
  11.             PromptDoubleResult pdr = ed.GetDouble("\nEnter Amount: ");
  12.             if (pdr.Status != PromptStatus.OK) return;
  13.  
  14.             SelectionFilter sf = new SelectionFilter(new TypedValue[1] { new TypedValue((int)DxfCode.Start, "INSERT") });//<<<--- a selection filter to get only block references
  15.  
  16.             //while (0==0)
  17.             try
  18.             {
  19.                 while (true)//<<--- the placement you used bothered my little brain, was stuck in my own while loop.  if this loop fails, I want my program to exit
  20.                 {
  21.                     PromptSelectionResult psr = ed.GetSelection(sf);//<<<-----use a selection filter to avoid a crash on casting to block reference
  22.                     if (psr.Status != PromptStatus.OK) return;
  23.  
  24.                     using (Transaction tr = db.TransactionManager.StartTransaction())
  25.                     {
  26.                         // Iterate the selection set
  27.                         foreach (ObjectId brId in psr.Value.GetObjectIds())
  28.                         {
  29.                             // Open the block reference
  30.                             BlockReference br = (BlockReference)tr.GetObject(brId, OpenMode.ForRead);//<<<<----- since you dont use a selection filter here this object could potentially not be a BR and crash
  31.                             //Could also skip selection and go forward with:
  32.                             //BlockReference br = tr.GetObject(brId, OpenMode.ForRead) as BlockReference;
  33.                             //if (br == null) continue;
  34.                             ed.WriteMessage("\n\nBlock: {0}", br.Name);
  35.                             // Iterate the attribute collection
  36.                             foreach (ObjectId attId in br.AttributeCollection)
  37.                             {
  38.                                 // Open the attribute reference
  39.                                 //AttributeReference att = (AttributeReference)tr.GetObject(attId, OpenMode.ForWrite);//<--- opening needlessly for write causes unneeded undo file entries
  40.                                 //instead:
  41.                                 AttributeReference att = (AttributeReference)tr.GetObject(attId, OpenMode.ForRead);
  42.                                 ed.WriteMessage("\nOld {0} = {1} ", att.Tag, att.TextString);
  43.  
  44.                                 try
  45.                                 {
  46.                                     double attValue = Convert.ToDouble(att.TextString);//<<---- since you are converting to double here would you be better to prompt for double instead of int?
  47.  
  48.  
  49.                                     double finalValue = attValue + pdr.Value;
  50.  
  51.                                     ed.WriteMessage("\nAdjusted {0} => {1}", att.Tag, finalValue);
  52.                                     //upgrade here because we're about to make a modification
  53.                                     att.UpgradeOpen();//<-- we only reach this point if you are dealing with a number to be converted
  54.                                     att.TextString = finalValue.ToString();
  55.                                     att.DowngradeOpen();
  56.                                 }
  57.                                 catch { ed.WriteMessage("\nOne or more attributes don't contain numbers. It was skipped :)"); }
  58.                             }
  59.                         }
  60.                         tr.Commit();
  61.                     }
  62.                 }
  63.             }
  64.             catch (System.Exception e)
  65.             { Application.ShowAlertDialog(String.Format("Will Says You Failed Horribly :P\n{0}", e.Message)); } //<<<----- This function will return if the user presses escape: this code is only reached on catastrophic failure
  66.  
  67.         }

Cheers

TheMaster

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #12 on: February 12, 2013, 01:15:23 PM »
thanks Kerry!... not sure who I jumped on but I didn't mean to... I appreciate the advice :)

The object browser helped a ton, but nothing I went through on Autodesk site even mentioned it.  Major fail :/ 


Look at the title bar at the top of your IDE.

Does it say "Autodesk Visual Studio", or does it say Microsoft Visual Studio ?

http://msdn.microsoft.com/en-us/beginner/default.aspx


bchapman

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #13 on: February 12, 2013, 03:39:25 PM »
Thanks TT... man you guys are ruthless... no mercy I suppose.... seems a culture of condemnation in the programmers world...

thanks Kerry!... not sure who I jumped on but I didn't mean to... I appreciate the advice :)

The object browser helped a ton, but nothing I went through on Autodesk site even mentioned it.  Major fail :/ 


Look at the title bar at the top of your IDE.

Does it say "Autodesk Visual Studio", or does it say Microsoft Visual Studio ?

http://msdn.microsoft.com/en-us/beginner/default.aspx
« Last Edit: February 12, 2013, 03:48:07 PM by BC_in_NV »

bchapman

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #14 on: February 12, 2013, 03:40:26 PM »
Thanks Will!! I'll review it carefully.

How's this?


Code - C#: [Select]
  1.         [CommandMethod("BCC:MAV")]
  2.         public void Test()
  3.         {
  4.             Document doc = Application.DocumentManager.MdiActiveDocument;
  5.             Database db = doc.Database;
  6.             Editor ed = doc.Editor;
  7.  
  8.             //PromptIntegerOptions BCCADJUST = new PromptIntegerOptions("\nEnter Amount: ");//<<--- since we arent specifying any options in here its redundant
  9.             //PromptIntegerResult BCCADJUSTMENT = ed.GetInteger("\nEnter Amount: ");
  10.             //double BCCADJVALUE = BCCADJUSTMENT.Value;
  11.             PromptDoubleResult pdr = ed.GetDouble("\nEnter Amount: ");
  12.             if (pdr.Status != PromptStatus.OK) return;
  13.  
  14.             SelectionFilter sf = new SelectionFilter(new TypedValue[1] { new TypedValue((int)DxfCode.Start, "INSERT") });//<<<--- a selection filter to get only block references
  15.  
  16.             //while (0==0)
  17.             try
  18.             {
  19.                 while (true)//<<--- the placement you used bothered my little brain, was stuck in my own while loop.  if this loop fails, I want my program to exit
  20.                 {
  21.                     PromptSelectionResult psr = ed.GetSelection(sf);//<<<-----use a selection filter to avoid a crash on casting to block reference
  22.                     if (psr.Status != PromptStatus.OK) return;
  23.  
  24.                     using (Transaction tr = db.TransactionManager.StartTransaction())
  25.                     {
  26.                         // Iterate the selection set
  27.                         foreach (ObjectId brId in psr.Value.GetObjectIds())
  28.                         {
  29.                             // Open the block reference
  30.                             BlockReference br = (BlockReference)tr.GetObject(brId, OpenMode.ForRead);//<<<<----- since you dont use a selection filter here this object could potentially not be a BR and crash
  31.                             //Could also skip selection and go forward with:
  32.                             //BlockReference br = tr.GetObject(brId, OpenMode.ForRead) as BlockReference;
  33.                             //if (br == null) continue;
  34.                             ed.WriteMessage("\n\nBlock: {0}", br.Name);
  35.                             // Iterate the attribute collection
  36.                             foreach (ObjectId attId in br.AttributeCollection)
  37.                             {
  38.                                 // Open the attribute reference
  39.                                 //AttributeReference att = (AttributeReference)tr.GetObject(attId, OpenMode.ForWrite);//<--- opening needlessly for write causes unneeded undo file entries
  40.                                 //instead:
  41.                                 AttributeReference att = (AttributeReference)tr.GetObject(attId, OpenMode.ForRead);
  42.                                 ed.WriteMessage("\nOld {0} = {1} ", att.Tag, att.TextString);
  43.  
  44.                                 try
  45.                                 {
  46.                                     double attValue = Convert.ToDouble(att.TextString);//<<---- since you are converting to double here would you be better to prompt for double instead of int?
  47.  
  48.  
  49.                                     double finalValue = attValue + pdr.Value;
  50.  
  51.                                     ed.WriteMessage("\nAdjusted {0} => {1}", att.Tag, finalValue);
  52.                                     //upgrade here because we're about to make a modification
  53.                                     att.UpgradeOpen();//<-- we only reach this point if you are dealing with a number to be converted
  54.                                     att.TextString = finalValue.ToString();
  55.                                     att.DowngradeOpen();
  56.                                 }
  57.                                 catch { ed.WriteMessage("\nOne or more attributes don't contain numbers. It was skipped :)"); }
  58.                             }
  59.                         }
  60.                         tr.Commit();
  61.                     }
  62.                 }
  63.             }
  64.             catch (System.Exception e)
  65.             { Application.ShowAlertDialog(String.Format("Will Says You Failed Horribly :P\n{0}", e.Message)); } //<<<----- This function will return if the user presses escape: this code is only reached on catastrophic failure
  66.  
  67.         }

Cheers

bchapman

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #15 on: February 12, 2013, 03:42:20 PM »
lol... thanks! I'll have to keep improving but don't have too much heart burn over it... I'm happy I just get the thing workin' as it is lol

WTF is this ??

looks like you have a displaced code block.

... and ( haven't analysed, so assume you use a break to escape this ) while true would be a more usual conditional.

Code: [Select]
            double BCCADJVALUE = BCCADJUSTMENT.Value;
                                                                                               
            {

                while (0 == 0)
                    try
                    {



BlackBox

  • King Gator
  • Posts: 3770
Re: Anyone have example for changing z elevation of polyline?
« Reply #16 on: February 12, 2013, 03:47:17 PM »
thanks Kerry!... not sure who I jumped on but I didn't mean to... I appreciate the advice :)

The object browser helped a ton, but nothing I went through on Autodesk site even mentioned it.  Major fail :/ 


Look at the title bar at the top of your IDE.

Does it say "Autodesk Visual Studio", or does it say Microsoft Visual Studio ?

http://msdn.microsoft.com/en-us/beginner/default.aspx

In an effort to build on Tony's excellent point (if I may)... I think you're (BC) overlooking development concepts generally with what I presume to be unintentional 'Autodesk blinders' on. This is unfortunately very common when stepping up from LISP to .NET API.

Given Object Oriented development as a whole, despite growing with each release, the Autodesk .NET API is a very tiny, perhaps minuscule, arena of the former.

If your goal is to become a capable AutoCAD .NET developer, then it is an essential, yet implied task, that you (first?) become a capable .NET developer (i.e., Console, Windows Forms, WPF Browser Applications, etc. to list a few), as while not explicitly stated in all beginner AutoCAD .NET materials, it can easily be considered to be a prerequisite... Particularly as you spill over into more complex tasks, and frameworks.

There are many free resources out there (some of which are available directly from Visual Studio's Start Page), but if you'd like to find a book to read, and re-read again, I found Andrew Troelsen's Pro C# 2010 and the .NET 4 Platform to be useful... All +1700 pages of it.



Andrew's Pro C# 5.0 and the .NET 4.5 Platform is also available for those who may be interested... Perhaps for the 2014 product line? *not sure*

... [NDA Censorship]
"How we think determines what we do, and what we do determines what we get."

TheMaster

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #17 on: February 12, 2013, 04:10:51 PM »
Thanks TT... man you guys are ruthless... no mercy I suppose.... seems a culture of condemnation in the programmers world...

Well, there may be a few here with something to prove, that might serve as motivation for giving you free training and tutoring on something that you barely understand, but unfortunately, I'm not one of them.

The reason that you're wearing out your welcome so quickly, and the reason you characterize some here as being part of a 'culture of condemnation', is because you are here trying to get spoon-fed, what most of us had to get through a lot of hard work, self-learning, paid-for-learning, and more generally, making the personal effort to learn to walk before trying to run, and did that without burdening others in an online discussion group with what amounts to free training.


« Last Edit: February 12, 2013, 04:17:43 PM by TT »

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Anyone have example for changing z elevation of polyline?
« Reply #18 on: February 12, 2013, 06:53:25 PM »
Thanks TT... man you guys are ruthless... no mercy I suppose.... seems a culture of condemnation in the programmers world...

This is the friendly end of the pool.  In the more... "dedicated" ... recesses of the online programming community you would be *vigorously* ripped a new one for not doing the initial leg work.  Part of it stems from the experience of inheriting somebody elses code which came from similar starting points and now doesn't work, requring serious analysis and/or a full re-write while execs are breathing down your neck.

If you aren't familiar with it, look up "RTFM".
If you are going to fly by the seat of your pants, expect friction burns.

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

BlackBox

  • King Gator
  • Posts: 3770
Re: Anyone have example for changing z elevation of polyline?
« Reply #19 on: February 12, 2013, 07:12:58 PM »
... For the 'visual learners':

If you aren't familiar with it, look up "RTFM".

"How we think determines what we do, and what we do determines what we get."

bchapman

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #20 on: February 12, 2013, 07:57:55 PM »
Understood...learned all on your own... no help... I'll leave ya be. Feel free not to "spoon feed" as you see fit.

Thanks TT... man you guys are ruthless... no mercy I suppose.... seems a culture of condemnation in the programmers world...

Well, there may be a few here with something to prove, that might serve as motivation for giving you free training and tutoring on something that you barely understand, but unfortunately, I'm not one of them.

The reason that you're wearing out your welcome so quickly, and the reason you characterize some here as being part of a 'culture of condemnation', is because you are here trying to get spoon-fed, what most of us had to get through a lot of hard work, self-learning, paid-for-learning, and more generally, making the personal effort to learn to walk before trying to run, and did that without burdening others in an online discussion group with what amounts to free training.

bchapman

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #21 on: February 12, 2013, 08:00:37 PM »
Thanks Renderman

... For the 'visual learners':

If you aren't familiar with it, look up "RTFM".



bchapman

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #22 on: February 12, 2013, 08:01:24 PM »
lol... feel bad for you guys

Thanks TT... man you guys are ruthless... no mercy I suppose.... seems a culture of condemnation in the programmers world...

This is the friendly end of the pool.  In the more... "dedicated" ... recesses of the online programming community you would be *vigorously* ripped a new one for not doing the initial leg work.  Part of it stems from the experience of inheriting somebody elses code which came from similar starting points and now doesn't work, requring serious analysis and/or a full re-write while execs are breathing down your neck.

If you aren't familiar with it, look up "RTFM".

bchapman

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #23 on: February 12, 2013, 08:02:32 PM »
Thanks Renderman... as always... full of helpful info... I've downloaded tons of material. Should help
thanks Kerry!... not sure who I jumped on but I didn't mean to... I appreciate the advice :)

The object browser helped a ton, but nothing I went through on Autodesk site even mentioned it.  Major fail :/ 


Look at the title bar at the top of your IDE.

Does it say "Autodesk Visual Studio", or does it say Microsoft Visual Studio ?

http://msdn.microsoft.com/en-us/beginner/default.aspx

In an effort to build on Tony's excellent point (if I may)... I think you're (BC) overlooking development concepts generally with what I presume to be unintentional 'Autodesk blinders' on. This is unfortunately very common when stepping up from LISP to .NET API.

Given Object Oriented development as a whole, despite growing with each release, the Autodesk .NET API is a very tiny, perhaps minuscule, arena of the former.

If your goal is to become a capable AutoCAD .NET developer, then it is an essential, yet implied task, that you (first?) become a capable .NET developer (i.e., Console, Windows Forms, WPF Browser Applications, etc. to list a few), as while not explicitly stated in all beginner AutoCAD .NET materials, it can easily be considered to be a prerequisite... Particularly as you spill over into more complex tasks, and frameworks.

There are many free resources out there (some of which are available directly from Visual Studio's Start Page), but if you'd like to find a book to read, and re-read again, I found Andrew Troelsen's Pro C# 2010 and the .NET 4 Platform to be useful... All +1700 pages of it.



Andrew's Pro C# 5.0 and the .NET 4.5 Platform is also available for those who may be interested... Perhaps for the 2014 product line? *not sure*

... [NDA Censorship]

BlackBox

  • King Gator
  • Posts: 3770
Re: Anyone have example for changing z elevation of polyline?
« Reply #24 on: February 12, 2013, 08:20:11 PM »
BC, I think you're taking this as some sort of personal attack, when in fact it is not... Especially among the programming kind, members tend to speak very matter-of-fact.

I just started the ascension from LISP to .NET myself recently... I may have an aptitude for development, but I could not have come as far as I have in (what I consider to be) such a short time-frame _without_ the help of others on this, and other forums alike (this one's the best though - giggity). That is why I strive to give back, where I feel it may be of use to others.

You're just starting to climb the proverbial mountain... Immerse yourself in the .NET documentation, tutorials, read related threads to help you troubleshoot, etc.. and for the love of all that is good, code, code, and code some more.

Methinks, it's the only way _you're_ going to learn (not just you, but anyone in this situation)... When you get stuck (and you will), post a clear, descriptive post, and don't forget to include some code (pseudo code is fine).

While I cannot speak for others, if my limited experience is any indicator, I'd bet a hot dollar that any one of the members you think is blasting you now (provided you follow the aforementioned suggestions), would gladly help to point you in the right direction. Just my $0.02.
« Last Edit: February 12, 2013, 08:38:25 PM by RenderMan »
"How we think determines what we do, and what we do determines what we get."

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Anyone have example for changing z elevation of polyline?
« Reply #25 on: February 12, 2013, 11:00:12 PM »

aw, gee, I hate it when that happens!.
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.

TheMaster

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #26 on: February 13, 2013, 02:59:08 PM »
BC, I think you're taking this as some sort of personal attack, when in fact it is not... Especially among the programming kind, members tend to speak very matter-of-fact.

I just started the ascension from LISP to .NET myself recently... I may have an aptitude for development, but I could not have come as far as I have in (what I consider to be) such a short time-frame _without_ the help of others on this, and other forums alike (this one's the best though - giggity). That is why I strive to give back, where I feel it may be of use to others.

You're just starting to climb the proverbial mountain... Immerse yourself in the .NET documentation, tutorials, read related threads to help you troubleshoot, etc.. and for the love of all that is good, code, code, and code some more.

Methinks, it's the only way _you're_ going to learn (not just you, but anyone in this situation)... When you get stuck (and you will), post a clear, descriptive post, and don't forget to include some code (pseudo code is fine).

While I cannot speak for others, if my limited experience is any indicator, I'd bet a hot dollar that any one of the members you think is blasting you now (provided you follow the aforementioned suggestions), would gladly help to point you in the right direction. Just my $0.02.

The reason I have a bad reaction to people who are complete noobs, and are expecting to be able to do what requires a good years worth of learning and practice, is because we generally communicate with others with an assumption that the other person can understand what is being written, the terms we use in what we write, etc., and that terms that most of us may take for granted as being understood, are not understood by a total noob.

So, to explain things to the noob, you have recursively explain things in your explaination, distilled down to terms they can understand, which means you have to write a #$%^ book for them, and in some cases, they seem to be expecting nothing less than that.


Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Anyone have example for changing z elevation of polyline?
« Reply #27 on: February 13, 2013, 03:09:14 PM »
< .. >
I can't argue with that ...

 and the subject IS a huge one to learn, and even re-learn when you've been away for a while. 
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.

BlackBox

  • King Gator
  • Posts: 3770
Re: Anyone have example for changing z elevation of polyline?
« Reply #28 on: February 13, 2013, 04:44:59 PM »
The reason I have a bad reaction to people who are complete noobs, and are expecting to be able to do what requires a good years worth of learning and practice, is because we generally communicate with others with an assumption that the other person can understand what is being written, the terms we use in what we write, etc., and that terms that most of us may take for granted as being understood, are not understood by a total noob.

So, to explain things to the noob, you have recursively explain things in your explaination, distilled down to terms they can understand, which means you have to write a #$%^ book for them, and in some cases, they seem to be expecting nothing less than that.

I am unsure if you felt that my response was in any way directed at you, Tony... Regardless, I don't believe a reasonable person would take issue with the sentiment you conveyed here.

This is a public forum, made up of volunteer members who kindly donate their time, effort, knowledge, and often wisdom... Something that is to be respected from the outset, each time one chooses to become the question-asker.


"How we think determines what we do, and what we do determines what we get."

TheMaster

  • Guest
Re: Anyone have example for changing z elevation of polyline?
« Reply #29 on: February 13, 2013, 07:51:10 PM »
The reason I have a bad reaction to people who are complete noobs, and are expecting to be able to do what requires a good years worth of learning and practice, is because we generally communicate with others with an assumption that the other person can understand what is being written, the terms we use in what we write, etc., and that terms that most of us may take for granted as being understood, are not understood by a total noob.

So, to explain things to the noob, you have recursively explain things in your explaination, distilled down to terms they can understand, which means you have to write a #$%^ book for them, and in some cases, they seem to be expecting nothing less than that.

I am unsure if you felt that my response was in any way directed at you, Tony... Regardless, I don't believe a reasonable person would take issue with the sentiment you conveyed here.

This is a public forum, made up of volunteer members who kindly donate their time, effort, knowledge, and often wisdom... Something that is to be respected from the outset, each time one chooses to become the question-asker.

RenderMan, no, I just replied to the last post, nothing about it that I took issue with.

I just wanted to clarify my position. 


BlackBox

  • King Gator
  • Posts: 3770
Re: Anyone have example for changing z elevation of polyline?
« Reply #30 on: February 13, 2013, 08:22:49 PM »
RenderMan, no, I just replied to the last post, nothing about it that I took issue with.

I just wanted to clarify my position.

No worries, Tony. :beer:
"How we think determines what we do, and what we do determines what we get."