+ Reply to Thread
Page 1 of 11 1 2 3 ... LastLast
Results 1 to 10 of 105
  1. #1
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default Ohm's Law Calculator

    Registered forum members do not see this ad.

    Hello to All,

    I finally finished this Ohm's Law Calculator and I seem to be pleased with the results, However the program size has me bothered. When using vector image on more complex entities such as circles and text, It creates much larger than expected lists. I tried to duplicate the image with MSLIDE, But I have no control over the image size that way and cannot duplicate the same results as vector image.

    Anyway, I am posting it just the same for feed back.

    For loading instructions, See this link: http://www.cadtutor.net/forum/showth...n-this-archive

    Revision List:
    Code:
                                        *Revisions*
      Date      Change                                              Program     By
      06/12/09  Reduce program size by vector_image modification    OLCv2.lsp   AMB
      06/13/09  Add Divide by zero error function                   OLCv3.lsp   AMB
      06/13/09  Program now calculates remaining two values         OLCv3.lsp   AMB
      06/13/09  Remove Mode Tile Function                           OLCv3.lsp   AMB
      06/14/09  Add Imaginary Number calcs to square root           OLCv4.lsp   LM
      06/14/09  Program remembers last formula selection            OLCv4.lsp   AMB
      06/16/09  Remove OLC_DCO Output Function                      OLCv5.lsp   CAB
      06/16/09  Consolidate OLC_CAI & OLC_DCO functions             OLCv5.lsp   CAB
      06/16/09  Remove all redundant programming                    OLCv5.lsp   CAB
      06/16/09  Improved variable localization                      OLCv5.lsp   CAB
      06/16/09  Improved programming for input errors               OLCv5.lsp   CAB
      06/16/09  Added OLC_T2N Error Function                        OLCv5.lsp   CAB
      06/16/09  Modified OLC_RAC Reset Function                     OLCv5.lsp   CAB
    VERSION 2 POSTED 06/12/09
    VERSION 3 POSTED 06/13/09
    VERSION 4 POSTED 06/14/09
    VERSION 5 POSTED 06/16/09

    I would like to express my thanks to the following individuals for their help and suggestions. A big thanks to Lee Mac, CAB, SEANT, David Bethel.
    From their contributions to this thread I was able to complete this program. I cannot say enough about these wonderful people that are always ready willing and able to give their time. It is my hope that others will find this program useful from a practical purpose or as a learning model.

    Please enjoy the program,
    The Buzzard
    Attached Images
    Attached Files
    Last edited by The Buzzard; 20th Jul 2010 at 12:14 pm. Reason: Revision 5

  2. #2
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,738

    Default

    Woww... haven't tried the code just yet, but just looking at the LISP: So Many Numbers....you sure do love your vector images.

    If the posted pic is anything to go by, then superb work Buzzard

    Lee
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  3. #3
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    Quote Originally Posted by Lee Mac View Post
    Woww... haven't tried the code just yet, but just looking at the LISP: So Many Numbers....you sure do love your vector images.

    If the posted pic is anything to go by, then superb work Buzzard

    Lee
    Thank you Lee,

    I do like the fact that I do not have to deal with slides when it comes to vector image. The size of the program without using it is next to nothing as compared to putting the image in. Just does not seem worth it. MSLIDE is a real pain in another sense.

    Anyway the program works well.

  4. #4
    Super Member CAB's Avatar
    Using
    AutoCAD 2000
    Join Date
    May 2004
    Location
    Tampa, Florida
    Posts
    801

    Default

    Your DCL is a thing of beauty!

    I would approach the lisp & vector coding a bit differently, but it gets the job done.

  5. #5
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    Quote Originally Posted by CAB View Post
    Your DCL is a thing of beauty!

    I would approach the lisp & vector coding a bit differently, but it gets the job done.
    Thanks CAB,

    What would you suggest in terms of a different approach?

  6. #6
    Super Member CAB's Avatar
    Using
    AutoCAD 2000
    Join Date
    May 2004
    Location
    Tampa, Florida
    Posts
    801

    Default

    For the vectors I would separate the circle/background into one list and make each cell
    into separate list. In this way you can feed the list to the vector_image with each group
    and just change the color for the group you want to use red on.

    For the operation of the user entry I would have a CLEAR button that blanked all 4 edit boxes.
    Then the action would react to the ENTER key. If there was only one value entered, do nothing.
    If there were two values entered & would solve for the two missing values.
    That's just my approach. Nothing wrong with yours.


    PS You could turn two formula red to match the results.

  7. #7
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    Quote Originally Posted by CAB View Post
    For the vectors I would separate the circle/background into one list and make each cell
    into separate list. In this way you can feed the list to the vector_image with each group
    and just change the color for the group you want to use red on.

    For the operation of the user entry I would have a CLEAR button that blanked all 4 edit boxes.
    Then the action would react to the ENTER key. If there was only one value entered, do nothing.
    If there were two values entered & would solve for the two missing values.
    That's just my approach. Nothing wrong with yours.


    PS You could turn two formula red to match the results.
    I think I know what you mean. I would have to mess with it a bit to get the feel for it, But that make so much sense.

    I will give that a shot and see what happens.

    Thanks for the advise.

  8. #8
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    Quote Originally Posted by The Buzzard View Post
    I think I know what you mean. I would have to mess with it a bit to get the feel for it, But that make so much sense.

    I will give that a shot and see what happens.

    Thanks for the advise.
    CAB,

    I did a test using the wheel with the text as the base image. Then I use only the selected red text for each selected image as the conditionals and seems to work well. I just need to finish it off. Will post the new version over the weekend.

    With regard to the program operation, I would need to study that much further.

    Great Tip on the images, That will reduce the program size dramatically.

    Thanks again,
    The Buzzard

  9. #9
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    Quote Originally Posted by The Buzzard View Post
    CAB,

    I did a test using the wheel with the text as the base image. Then I use only the selected red text for each selected image as the conditionals and seems to work well. I just need to finish it off. Will post the new version over the weekend.

    With regard to the program operation, I would need to study that much further.

    Great Tip on the images, That will reduce the program size dramatically.

    Thanks again,
    The Buzzard
    Attention to All,

    CAB introduced to me a fix for the vector image eliminating the image redundancy and thus producing a much smaller program.

    The programs original size was 582KB reduced down to 119KB.
    What a major difference that is.

    The revised files have been uploaded to the first post, So you can get the program there.

    Thank You CAB and to All Enjoy!
    The Buzzard

  10. #10
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,738

    Default

    Registered forum members do not see this ad.

    Very nice Buzzard, just been playing around with it

    I love that dialog image, superb illustration - and many thanks for the mention in the "About" dialog - I feel honoured

    1 thing you might want to consider though, perhaps include a line of code to account for divide by zero errors with perhaps an error tile to notify the user if they enter, for example, 0 Ohms in formula 1.

    Just a thought

    Lee
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

Similar Threads

  1. Ohm's Law Formulas
    By The Buzzard in forum AutoLISP, Visual LISP & DCL
    Replies: 23
    Last Post: 8th Jun 2009, 11:06 am
  2. AutoCAD Calculator
    By Lil-ndn-gyrl in forum AutoCAD General
    Replies: 2
    Last Post: 19th Mar 2009, 02:02 pm
  3. U - Value Calculator In Mep
    By S.P.I in forum MEP
    Replies: 0
    Last Post: 3rd Mar 2009, 05:04 pm
  4. Is there a ddedit CALCULATOR?
    By coombsie11 in forum AutoLISP, Visual LISP & DCL
    Replies: 15
    Last Post: 18th Oct 2008, 02:15 pm
  5. C - Calculator
    By CAD Panacea in forum AutoCAD RSS Feeds
    Replies: 0
    Last Post: 11th Jan 2007, 05:24 am

Bookmarks

Posting Permissions

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