Author Topic: Topics for a VBA Tutorial  (Read 19717 times)

0 Members and 1 Guest are viewing this topic.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Topics for a VBA Tutorial
« on: May 03, 2005, 05:31:35 PM »
Please post what kind of topics you would like to see in a VBA tutorial.  Please try to keep this thread on topic.  EX. I would like a utility to turn all my graphics to Color=ByLayer and Linetype=ByLayer
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Oak3s

  • Guest
Topics for a VBA Tutorial
« Reply #1 on: May 03, 2005, 05:52:07 PM »
for tutorial topics i would like a tutorial on how to 'use' the utility created.
for specific utilitiesi would like a utility to create layers.
"" to insert blocks from specified location

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Topics for a VBA Tutorial
« Reply #2 on: May 03, 2005, 05:55:40 PM »
both of those are good topics.  Espically the first b/c VBA doesn't offer an EASY way to make a shortcut.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
Topics for a VBA Tutorial
« Reply #3 on: May 03, 2005, 06:27:59 PM »
1 ) Entity manipulation and creation.

2 )  File I/O.

In that order.
TheSwamp.org  (serving the CAD community since 2003)

Birdy

  • Guest
Re: Topics for a VBA Tutorial
« Reply #4 on: May 03, 2005, 07:03:01 PM »
Quote from: CmdrDuh
I would like a utility to ...

How 'bout start a new job/open existing job.
New job would give an interface (dailog?) to enter pertinent info like job name, number, customer, etc. and create a folder, populate the titleblock info & save everything to a drive location.  Existing job would either open an existing dwg for editing, or add a new dwg to the existing folder.

IOW, no more creating folders or browsing thru them in windoze.

BAshworth

  • Guest
Topics for a VBA Tutorial
« Reply #5 on: May 04, 2005, 01:51:18 AM »
Ok, that's easily do-able Birdy.  Although, isn't this what the wonderful folks at Autodesk gave us the Sheet Set Manager for? :D  J/k.

The entity manipulation is also a very good one.  VBA gives us almost total control over all the aspects of a drawing object's properties, but very few of the modifications are available directly. (ex. trim, break, move, copy)  You can still do all of those, but you have to know your way around to be able to pull it off.

For file I/O, are you talking about text files, or dwg files?

heh, "blocks" will be fun.  Since "blocks" and "blockreferences" are two terms that don't come into AutoLisp very often.

As a given, any tutorials will seem easier for those versed in V-Lisp vs. those who only know AutoLisp.  V-Lisp uses many of the same terms as VBA, and the way of manipulating objects is also somewhat similar.

I think that we can also work in the topics that Mark mentioned (private and public subs and functions) at the same time.

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
Topics for a VBA Tutorial
« Reply #6 on: May 04, 2005, 03:30:13 AM »
Quote
For file I/O, are you talking about text files, or dwg files?

text files.
TheSwamp.org  (serving the CAD community since 2003)

Birdy

  • Guest
Topics for a VBA Tutorial
« Reply #7 on: May 04, 2005, 07:14:04 AM »
Quote from: BAshworth
Ok, that's easily do-able Birdy.  Although, isn't this what the wonderful folks at Autodesk gave us the Sheet Set Manager for? :D  J/k.


Sheet sets... gotta have em to use em (a2k4 here) unless I'm missing something.

daron

  • Guest
Topics for a VBA Tutorial
« Reply #8 on: May 04, 2005, 08:01:05 AM »
So is this going to be a tag team teaching set? It is getting interesting.

jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
Topics for a VBA Tutorial
« Reply #9 on: May 04, 2005, 08:42:19 AM »
Would it be possible to create a routine that stops users creating layers with "incorrect" layer names :roll:
Thanks for explaining the word "many" to me, it means a lot.

ELOQUINTET

  • Guest
Topics for a VBA Tutorial
« Reply #10 on: May 04, 2005, 09:23:29 AM »
some basic terms would be nice to begin with (for me at least)
and a tutorial of the vba manager (which i still don't quite grasp)  :oops:

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Topics for a VBA Tutorial
« Reply #11 on: May 04, 2005, 09:29:51 AM »
Quote from: ELOQUINTET
some basic terms would be nice to begin with (for me at least)
and a tutorial of the vba manager

Im working on that right now.  I hope to have something ready to hand out by Monday
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Topics for a VBA Tutorial
« Reply #12 on: May 04, 2005, 09:32:26 AM »
Quote from: jonesy
Would it be possible to create a routine that stops users creating layers with "incorrect" layer names :roll:

No, but maybe. Depends on how cruel you want to be to your non-conformists.  Say for instance they created a wrong layer name, you can search the entire drawing for non standard names, and move all the graphics on those layers to another layer.  Then they would have to sort out the mess on the correct layers.  Or you could just delete it and make them do it again.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

daron

  • Guest
Topics for a VBA Tutorial
« Reply #13 on: May 04, 2005, 09:34:15 AM »
Sounds like ODBX to the rescue on that one?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Topics for a VBA Tutorial
« Reply #14 on: May 04, 2005, 09:40:22 AM »
Well, you "could" do something a little more sneaky .... how about turning off the ability to create layers altogether .. force users to use a template with the layers already defined. It can be done ... but it won't be pretty
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