Author Topic: Running before crawling!  (Read 4260 times)

0 Members and 1 Guest are viewing this topic.

ScottBolton

  • Guest
Running before crawling!
« on: August 30, 2010, 08:47:24 AM »
Chaps,

I'm completely new to VB (though I'm a novice with VBA) and also new to posting in this forum although I've visited a few times before so, "Howdy!".

Can somebody please point me in the right direction with a couple of examples so that I can get my head around the way VB works (in 2008)?

Example 1: Create a new layer "Test", change the color to "Red". Maybe check for the layer's presence and color first...? Now draw a line from '(0 0 0) to a point picked by the user - showing the rubber band between the two.

Example 2: Search for a block "hfd" and then an attribute in it called "tek". Get the final four characters of the contents, convert this to an integer, add 1, convert it back to text and substitute the part of the original text with this new part. Basically I'm incrementing a drawing number.

Both are incredibly simple in LISP (so why not stick with it?!) but it's time to see what VB can do!

S

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Running before crawling!
« Reply #1 on: August 30, 2010, 10:14:17 AM »
Welcome to theswamp Scott. Sorry I'm no help with VBA. :)
TheSwamp.org  (serving the CAD community since 2003)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Running before crawling!
« Reply #2 on: August 30, 2010, 11:33:36 AM »
Are you using VBA, VB or VB.Net?

Each one has its own way to access the drawing object.

I'm sure if you explain the need a little more, someone will be able to help you get started.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

ScottBolton

  • Guest
Re: Running before crawling!
« Reply #3 on: August 30, 2010, 12:08:35 PM »
Are you using VBA, VB or VB.Net?

Each one has its own way to access the drawing object.

I'm sure if you explain the need a little more, someone will be able to help you get started.

Keith, thanks for getting in touch. I thought my post was clear - perhaps not! I'm wanting to learn VB (and [much] later will want to compile into VB.NET) and thought the couple of "simple" examples would get me on my way. I'm using Visual Basic 2010 Express.

S

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Running before crawling!
« Reply #4 on: August 30, 2010, 12:23:54 PM »
Well, there ya go .. you will be using VB.Net VB 2010 Express is only .Net, therefore you will compile into a .Net assembly or perhaps a stand alone executable.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8691
  • AKA Daniel
Re: Running before crawling!
« Reply #5 on: August 30, 2010, 07:09:31 PM »
Welcome to theswamp Scott! 
Yeah there are so many VBs out there, you have to be specific, I.e. VBA, VB6, VB.NET.
Since it appears that your using VB.NET, you might want to ask in the .NET area. You will probably find more samples in there as well.

Enjoy your stay  :-)

ScottBolton

  • Guest
Re: Running before crawling!
« Reply #6 on: August 31, 2010, 02:11:04 AM »
I'm confused...?

I thought that in Visual Basic 2010 Express code was written in VB (hence I'm posting in the VB(A) forum) and later can be compiled into .NET. The few tutorials I've been through so far appear to be plain VB. Am I missing summat?

S

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8691
  • AKA Daniel
Re: Running before crawling!
« Reply #7 on: August 31, 2010, 02:21:15 AM »
Nah, this area.. the VB, VB(A) area catered to the once popular technology 'ActiveX through VB', but now is becoming extinct as Adesk announced its plan to kill it. Head on over to the .NET area where all the other happy VB.NET'ers hang.  FYI, don't sweat it if the C#'ers pick on you, it's all in good fun.  :-)

ScottBolton

  • Guest
Re: Running before crawling!
« Reply #8 on: August 31, 2010, 04:07:59 AM »
Okey-kokey. My bags are packed and I'm headin' on over...