amateur programming

Discussion in 'SolidWorks' started by mikte, Aug 1, 2003.

  1. mikte

    mikte Guest

    While being aware of their existence for a while, I started to use
    dimension favorites.

    I created a couple that seem to work OK but when I went to save them
    to a file, no dialog popped would up per the help file.

    I puzzled over this a bit and finally figured out that I had named the
    dimesion favorites with text that would be an invalid file name.

    Solidworks did not prevent that nor did it issue a warning about an
    invalid file name. It just did nothing.

    At first I thought it was a bug, but now I know it is just piss-poor
    programming.

    Mike
     
    mikte, Aug 1, 2003
    #1
  2. mikte

    Dean Mazure Guest

    What was the invalid filename?
     
    Dean Mazure, Aug 1, 2003
    #2
  3. mikte

    mikte Guest

    Dean,

    I believe I used a name like '[x.xxx]/x.xx'. The / is an illegal
    character. I didn't know I was creating a filename when I named the
    Dim. Fav.

    But that is beside the point. No program should attempt to write to a
    file without checking several parameters (legal file name, available
    disk space, etc.)
    and if any of these fail then alert the user.

    I always did that in the couple of commercial applications I wrote.
    Generally one has a couple of stock routines (depending on the
    circumstances) one can call whenever a disk write is required.

    How a big buck 'Professional' package like SW failed this is amazing.

    Mike
     
    mikte, Aug 4, 2003
    #3
  4. mikte

    Todd Guest

    Actually Mike, i would say that is a bug. Once the save-as dialog opens it
    would allow you to use whatever name you want. It seems as though it uses
    the dim favorite name as the default name, so when you click the save
    favorite button it is getting confused with the characters you are using.

    Did you call you VAR to report this?

    Todd


     
    Todd, Aug 4, 2003
    #4
  5. I believe I used a name like '[x.xxx]/x.xx'. The / is an illegal
    This could have read much better as a "tip" for those users unfamiliar with
    dim favorites and the "bug" you found. Instead you choose to mock SolidWorks
    programmers. Get off your high-horse and submit it for an SPR.

    Geez...

    Richard
    ...lousy weekend, feeling pissy.
     
    Richard Doyle, Aug 4, 2003
    #5
  6. mikte

    mikte Guest

    Richard,

    Actually my horse is not very high.

    I run into examples of this kind of programming constantly and have
    given up my career as a Solidworks bug scout.

    Of all the programs I use every day, SW is the one that generates the
    most instances of 'Damn, why couldn't they have done a better job on
    this feature'.

    I didn't do anything bizarre to find the issue above. I ran across it
    on the first try. It appears to me that Solidworks relies on its user
    base to do the level of testing that most software companies do
    internally. If that is the case then they deserve public post like
    mine.

    Don't be so defensive on SW's behalf, I think after all the criticism
    they've already had, they have fairly thick skins.

    Mike
     
    mikte, Aug 4, 2003
    #6
  7. mikte

    rocheey Guest

    Once the save-as dialog opens it would allow you to use whatever
    name you want.

    Correct, but the file dialog does NOT do any file write operations. It
    is merely an interface supplied by the Windows API, which returns a
    path name/filename (or NULL if the user selects CANCEL). It is then
    completely up to the calling program to do anything USEFUL with this
    filespec.

    In addition, standard programming practice dicates you 'seed' a
    default answer/reply with a 'safe', but not necessary elegant, value.
    Like when you are doing an install, all the "standard" install options
    are set as the default
    buttons, so if the user is not completely sure, he can opt out and
    just hit the [enter] key and take the safe way out.

    ... imagine if "Y" was the default response when someone clicked
    "FDISK"....
     
    rocheey, Aug 5, 2003
    #7
  8. mikte

    Joel Moore Guest

    (Cliff Huprich) wrote in
    It's not obvious you're naming a file when you add a saved dimension. On
    its own SW decided to use the description as the default file name when
    exporting to a file. It choked on the special characters and reported
    nothing to the user rather than removing the offending characters or
    offering a different default. An obvious bug. Probably overlooked so long
    since saved dimensions is a pretty obscure feature (IMO).
     
    Joel Moore, Aug 5, 2003
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.