Consulting

Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 21 to 40 of 47

Thread: AutoCAD VBA help with files in dir

  1. #21
    VBAX Regular
    Joined
    Jul 2007
    Posts
    34
    Location
    Quote Originally Posted by Tommy
    The sset is a selection set which has to be there for the export option to work. It is ignored (according to help) and I don't understand why it is neccessary unless internally they fill it and export it.
    Oh ok I know what you mean!

    Quote Originally Posted by Tommy
    LOL C++ is arx in acad. It is actually an external program loaded into acad memory space. You'll need a SDK for that. Have you tried Lisp? Have you learned how to customize the menus?
    I have not tried Lisp other than some examples and as far as menues, I just use the icons unless I have to use a menue option so no, I have not done any customizations to them.

    I have heard about arx but not sure what it is and I don't know what SDK is.......

  2. #22
    VBAX Regular
    Joined
    Jul 2007
    Posts
    34
    Location
    Quote Originally Posted by lucas
    Hi Tommy, Rob will be taking advantage of your signature line if you keep this up Not sure he knows what he's getting himself into.
    You may be right, ..........I may be crazy...........and swearing is not optonal at least this is what the programer that sits next to me says!


  3. #23
    Moderator VBAX Master Tommy's Avatar
    Joined
    May 2004
    Location
    Houston, TX
    Posts
    1,184
    Location
    LOL You are fixing to step off into some real fun.
    SDK: Software Development Kit

    LOL Hey Steve, I don't have to smack'em around any. I melt the math co-processors

  4. #24
    VBAX Regular
    Joined
    Jul 2007
    Posts
    34
    Location
    Quote Originally Posted by Tommy
    LOL You are fixing to step off into some real fun.
    SDK: Software Development Kit

    LOL Hey Steve, I don't have to smack'em around any. I melt the math co-processors
    Yeah tonight is my first class! I am starting to get nervious now though.....LOL

    So then, if I learn some basics in my C++ class and I get a SDK what will I be able to do in Autocad for programing?

  5. #25
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Quote Originally Posted by Tommy
    LOL You are fixing to step off into some real fun.
    SDK: Software Development Kit

    LOL Hey Steve, I don't have to smack'em around any. I melt the math co-processors
    math co-processor!......you're telling your age.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  6. #26
    Moderator VBAX Master Tommy's Avatar
    Joined
    May 2004
    Location
    Houston, TX
    Posts
    1,184
    Location
    math co-processor!......you're telling your age.
    LOL look whos talking, you have to be old as me to know that!! Besides that it's skill to melt the Math Co-processor now that is part of the CPU!

    So then, if I learn some basics in my C++ class and I get a SDK what will I be able to do in Autocad for programing?
    With a lot of patience and a lot of reading anything you want.

  7. #27
    VBAX Regular
    Joined
    Jul 2007
    Posts
    34
    Location
    Quote Originally Posted by Tommy
    ...With a lot of patience and a lot of reading anything you want.
    Very interesting stuff! So I have my C++ book now but I suppose I will need a book about AutoCAD's ObjectARX is there an ObjectARX book that you can recomend?

  8. #28
    Moderator VBAX Master Tommy's Avatar
    Joined
    May 2004
    Location
    Houston, TX
    Posts
    1,184
    Location
    I don't have to go that deep (ObjectARX), at least right now.

    But the documentation fram autodesk is very good. Most of the time you can use their examples straight from the help/documentation. Otherwise visit the newsgroups for autodesk.

    How was your first lesson?

  9. #29
    VBAX Regular
    Joined
    Jul 2007
    Posts
    34
    Location
    Quote Originally Posted by Tommy
    ....How was your first lesson?
    It went ok, it was just an overview of all things to come, the teacher stressed that we will do alot with memory. He also said with C++ we will have full control of the CPU as well.

    Tommy I have a question, I have a strange problem now trying to load my VBA projects in AutoCAD, after I load them and I have it up on the screen in the VB editor they wont run as usual but instead the load macro dialog box opens up and nothing in it seems to work, any ideas on this problem or how to fix it?

    Edit: Its working now but its acting strange but it should be ok.....

    Thanks,
    Rob
    Last edited by RMS; 09-06-2007 at 07:29 AM.

  10. #30
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Hi Rob,
    Are you saving your projects as external files with a .dvb file extention?
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  11. #31
    VBAX Regular
    Joined
    Jul 2007
    Posts
    34
    Location
    Quote Originally Posted by lucas
    Hi Rob,
    Are you saving your projects as external files with a .dvb file extention?
    Well....I think I am; they are being saved in a folder and with a .dvb extention.

  12. #32
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    and if that directory is in your support file search path...if not add it.

    Tools-options-
    select the files tab at top
    click the x or + sign to the left of "Support file search path"
    then on the right side select browse to add your directory to the list.

    Then they are available every time you run cad and you can add buttons to a new or existing toolbar to run them...right click on any menu and select customize.

    code for the button:
    -vbarun;nudge.dvb!nudge;
    nudge.dvb is the name of the file & nudge; is the name of the module
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  13. #33
    VBAX Regular
    Joined
    Jul 2007
    Posts
    34
    Location
    Quote Originally Posted by lucas
    and if that directory is in your support file search path...if not add it.

    Tools-options-
    select the files tab at top
    click the x or + sign to the left of "Support file search path"
    then on the right side select browse to add your directory to the list.

    Then they are available every time you run cad and you can add buttons to a new or existing toolbar to run them...right click on any menu and select customize.

    code for the button:
    -vbarun;nudge.dvb!nudge;
    nudge.dvb is the name of the file & nudge; is the name of the module
    The File path were there but I added them again just in case, I think one of my custom buttons to load the application got corrupted so I made another button.

    I tried what you suggested but It did not work, first thing is I am not sure what the "Module" is called if any, I just have a file name but I tried this, am I on the right track?

    Edit: One problem I am still having is say, when I used to go file, open, I would normally get a dialog box in a window, then search through that BUT now it asked for a drawing name at the command line? .......some setting is messed up and I can't seem to find it.
    Last edited by RMS; 09-06-2007 at 12:21 PM.

  14. #34
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    The image goes with this code which is in the attext.dvb
    The name of the module is ExtractBOM
    [VBA]
    Option Explicit
    Sub ExtractBOM()
    'some code goes here
    End Sub
    [/VBA]
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  15. #35
    VBAX Regular
    Joined
    Jul 2007
    Posts
    34
    Location
    Shoot......hey Lucas thanks a bunch for the help I will give that a try, I would have never guesed that!

    Rob

  16. #36
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Edit: One problem I am still having is say, when I used to go file, open, I would normally get a dialog box in a window, then search through that BUT now it asked for a drawing name at the command line? .......some setting is messed up and I can't seem to find it.
    Type this at the command line:
    FILEDIA

    If it's set to zero then something has changed it. Make sure it's set to 1 and then try it.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  17. #37
    VBAX Regular
    Joined
    Jul 2007
    Posts
    34
    Location
    Quote Originally Posted by lucas
    Type this at the command line:
    FILEDIA

    If it's set to zero then something has changed it. Make sure it's set to 1 and then try it.
    Yeah it was set to "0" I put it back to 1.

    Thanks

    P.S. Messing with the Custom Button Icons right now

    Edited: Buttons now load the .dvb macros! Now I am back on track!

    Thanks Again, you guys are great!
    Last edited by RMS; 09-06-2007 at 01:47 PM.

  18. #38
    VBAX Regular
    Joined
    Jul 2007
    Posts
    34
    Location
    Hey Lucas, are you a guitar player?

  19. #39
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    I have an acustic Alvarez that I've had since 1969. My youngest son Ben who is 22 and I play almost every day. We have guitars, amps, pa, drums, etc. here and get together with friends and sometimes have a drink. It's a lot of fun. The boys had a band for a while but college got in the way. We homeschooled the kids so he had to figure out some way to deal with me.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  20. #40
    Moderator VBAX Master Tommy's Avatar
    Joined
    May 2004
    Location
    Houston, TX
    Posts
    1,184
    Location
    LOL well I see everything is in order.

    @ Rob

    Oh please tell me why, just WHY did you have to ask about that?!?!!?!?!??
    DON'T talk about THAT!!!!!!

    It'll be DAYS before he quits!!!!!

    HAHA just poking some fun.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •