Purge Dimstyle "Standard"

Discussion in 'AutoCAD' started by John Uhden, Jun 5, 2004.

  1. John Uhden

    John Uhden Guest

    Using 2004, I found that the -PURGE command would permit purging dimstyle
    "Standard" (so long as it's not the active dimstyle), but the dialog PURGE
    command would not. In fact, if you toggle on "View items you cannot purge" the
    TIP window reports "The default dimension style, STANDARD, cannot be purged."
    Just tested... same story in 2000i and 2002. Not so in R14.01.

    Is this a bug in the -PURGE command, or is it really okay to purge dimstyle
    "Standard?" I've checked out drawings after purging "Standard" and they seem to
    behave alright, but I wonder if they'll ultimately be corrupted.

    I discovered this by accident after using an adaptation of Marco's function:
    ;; Step#16 - Purge Dimstyles
    ;; Credit to Marc'Antonio Alessi
    (defun @Step#16 ( / Purging)
    (and
    (setq Purging T)
    (while Purging
    (setq Purging nil)
    (command "._PURGE" "_Dim" "*" "_YES")
    (while (> (getvar "CMDACTIVE") 0)
    (setq Purging (not (command "_YES")))
    )
    1
    )
    )
    )

    If "Standard" should really NOT be purged, the apparent solution is to replace
    "*" with "~STANDARD" which seems to ignore case.
     
    John Uhden, Jun 5, 2004
    #1
  2. Hi John,

    Bug?, not certain. What I do know is I have
    always purged 'standard' from my drawing files
    and don't have any trouble with corruption.

    FWIW
     
    Jason Piercey, Jun 5, 2004
    #2
  3. John Uhden

    John Uhden Guest

    Thanks, Jason. I tend to agree with your observation. Perhaps Autodesk should
    fix one or the other (PURGE vs. -PURGE) to eliminate the confusion. BTW, the
    PurgeAll method will delete "Standard" also.
     
    John Uhden, Jun 5, 2004
    #3
  4. John Uhden

    Steve Doman Guest

    John,

    I'm still running A2k2 so don't know about later releases but ...

    I have noticed that if you rename the initial dimstyle "Standard" to say
    "Test" for example, and then later create a new dimstyle named
    "Standard", then AutoCAD will not let you purge "Test", but will let you
    purge the new "Standard".

    So from observation, it appears that AutoCAD doesn't let you purge the
    initial dimstyle in the drawing. (did that makes sense)

    Don't know if that's your situation or not.

    Steve Doman
     
    Steve Doman, Jun 5, 2004
    #4
  5. John Uhden

    John Uhden Guest

    Thanks, Steve. But I think the case is really that you *can't* purge the
    'ActiveDimStyle no matter what its position in the table, and you *can* purge
    any nonactive nonreferenced dimstyle no matter what its position in the table or
    what it's named. Of course I say this in 2000+ context, not R14.
     
    John Uhden, Jun 5, 2004
    #5
  6. John Uhden

    TCEBob Guest

    It's an interesting question, and for us compulsives might bring a slacking of
    tension. But is there a compelling reason to delete it?

    rs
     
    TCEBob, Jun 5, 2004
    #6
  7. John Uhden

    Walt Engle Guest

    Funny how some always want to do something different. If it ani't broke.......
     
    Walt Engle, Jun 5, 2004
    #7
  8. John Uhden

    John Uhden Guest

    There's no compelling reason. I was simply wondering which was abnormal... to
    be able to delete it (-PURGE) or not to (PURGE). I had never noticed that you
    could purge dimstyle "Standard" until having run Marco's function, which, of
    course, won't tell you that it has purged "Standard" unless your CMDECHO is
    turned on and you scroll back up the text screen.

    At this point I feel confident that it's okay, so it becomes just the client's
    choice as whether to retain it or let it go. My guess is that they'll want to
    delete it so that all their 6135 dwgs I'm converting will contain only the one
    (1) dimension style upon which they intend to standardize.
     
    John Uhden, Jun 5, 2004
    #8
  9. John Uhden

    TCEBob Guest

    Very wise under the circumstances. I always thought of it as a required pain,
    like Display Configuration: Standard v
    rs
     
    TCEBob, Jun 5, 2004
    #9
  10. You are quite correct.

    You can find some past discussions about this, and to just
    summarize, AutoCAD will not allow you to purge a drawing of
    *all* dimension styles (I suppose because there must always
    be an Active Dimstyle, but there are probably other good
    reasons).

    Hence, AutoCAD places no significance on the dimstyle whose
    name is 'Standard'. It places significance on the *first* entry
    in the dimension style dictionary.

    To wit, there is an ObjectARX API function that returns the
    'default' dimstyle table entry's Object ID. As it turns out,
    this function simply returns the object id of the first entry
    in the dimstyle table. TMK, there's nothing else about that
    dimstyle that makes it sigificant, other than its position
    in the dimstyle table.

    The governing constraint is that you cannot purge a drawing of
    *all* dimstyles, but AutoCAD's way of enforcing it, is to not
    allow you to delete/purge the first entry even if it is not
    referenced.

    FWIW, you can circumvent the constraint by editing a DXF file,
    and can do anything, including remove the first dimstyle or
    rearrange the order of the dimstyle table. But, I'll venture to
    guess that you cannot remove *all* dimension styles and still
    have a valid full DXF file that is accepted by DXFIN.

    --
    http://www.caddzone.com

    AutoCAD based Security Planning Solutions:
    http://www.caddzone.com/securityplanning

    AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
    http://www.acadxtabs.com
     
    Tony Tanzillo, Jun 6, 2004
    #10
  11. John Uhden

    John Uhden Guest

    Unless I'm misunderstanding you, I think you're partially wrong. At this point
    I don't think there is any significance on the first entry in the DimStyle
    table. I believe you *can* purge the first entry in the DimStyle table so long
    as it is neither the ActiveDimStyle nor referenced, no matter what its name.
    Note that the ActiveDimStyle need not be nor does become the first entry in the
    table unless preceding entries are purged/deleted. This may not have been the
    nature in R14 or earlier, but it seems to be with R15+. Just as Autodesk has
    confused us with the PURGE vs. the -PURGE commands, perhaps the ObjectARX API
    documentation is not consistent with the AutoLisp (tblnext) function or related
    ActiveX methods.
     
    John Uhden, Jun 6, 2004
    #11
  12. Hi John, thanks for credit,

    ---

    (this is slightly different from Tony stated)

    Tested in A2k4:

    1. DimStyles:

    1.1 you can -purge (command line) or rename all DimStyles
    regardless of position in dimstyle table with the
    rename command or Dimstyle command

    1.2 you cannot rename the DimStyle "Standard" with entmod

    1.3 if you rename the DimStyle "Standard" with the rename
    command or Dimstyle command, now you can rename it
    with entmod and purge it with dialog PURGE command


    2. Styles (text):

    2.1 you can rename all Styles with the rename command

    2.2 you cannot rename the first entry of style table
    with Style command

    2.3 you cannot purge the first entry of style table

    2.4 you cannot rename the Style "Standard" with entmod

    2.5 if you rename the Style "Standard" with the rename
    command, now you can rename it with entmod

    ---

    See also: ""Standard" tblobjname(s)" - posted in 2001?

    From AutoCAD 2004 docs:

    The following entries may not be renamed [ (with entmod) ]
    but are otherwise modifiable, subject to restriction:

    Symbol table entries that cannot be renamed
    Table Entry name
    STYLE STANDARD
    DIMSTYLE STANDARD
    BLOCKS *MODEL_SPACE
    BLOCKS *PAPER_SPACE
    APPID No entries may be renamed



    --------------------------------------------------
    Purge notes
    --------------------------------------------------

    In >A2k2:


    3. you can purge all nested obects with one pass
    with:

    1.1 Purge command dialog

    1.2 (command "_.PURGE" "_ALL" "*" "_N") < "_N"



    4. with:

    (vla-purgeall (vla-get-activedocument (vlax-get-acad-object)))
    or
    (command "._PURGE" "_All" "*" "_YES") < "_YES"

    you purge only on level a time


    Note: (command "._PURGE" ...) is equivalent to -purge
    command line

    See also: "Purge vs. vla-purgeall" posted in 2001?


    ---

    Cheers.

    ________________________________________________

    Marc'Antonio Alessi
    http://xoomer.virgilio.it/alessi
    (strcat "NOT a " (substr (ver) 8 4) " guru.")
    ________________________________________________
     
    Marc'Antonio Alessi, Jun 6, 2004
    #12
  13. Marc'Antonio - You're correct, my comments were erroneously
    referring dimstyles, but in reality, apply to text styles.
    There's no ObjectARX API function for getting the 'standard'
    or default dimstyle either (as there is for text styles).


    --
    http://www.caddzone.com

    AutoCAD based Security Planning Solutions:
    http://www.caddzone.com/securityplanning

    AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
    http://www.acadxtabs.com


     
    Tony Tanzillo, Jun 6, 2004
    #13
  14. John Uhden

    Steve Doman Guest

    Tony,

    Thanks for the confirmation but I think maybe AutoCAD's purge behavior
    may have changed in recent versions. I just did a short test using
    AutoCAD 2005 to purge dimstyles and here's what happened:

    *** AutoCAD 2005 ***

    Using the dialogue based PURGE command, the "Standard" dimstyle was
    filtered from the list of items shown in the list "View items you can
    purge". Whether or not "Standard" was the first dimstyle entry didn't
    matter. Hence, I was unable to purge "Standard".

    On the other hand, using the command line version -PURGE, AutoCAD did
    allow purging the "Standard" dimstyle. It didn't matter if "Standard"
    was the first dimstyle entry or not, so long as it wasn't referenced of
    course.

    Hmmf! Rather inconsistent I must say. Well the last time I checked
    AutoCAD wouldn't allow purging the initial dimstyle. My statement in my
    previous post was based on experience from using the new fangled
    dialogue PURGE command, and ASSuming the command line version worked the
    same way.

    Steve Doman
     
    Steve Doman, Jun 6, 2004
    #14
  15. Tony Tanzillo, Jun 7, 2004
    #15
  16. Ok,

    I have noted also (AutoCAD 2004 Italian version):

    1. if you make a new empty drawing with metric default

    1.1 there is a Dimstyle "ISO-25" (no Standard)
    1.2 there is a Style "Standard"


    2. if you make a new empty drawing with imperial default

    2.1 there is a Dimstyle "Standard"
    2.2 there is a Style "Standard"

    ....

    9. consequently:

    9.1 Dimstyle Standard is not always present in a drawing
    9.2 Style Standard is always present in a drawing until
    it is renamed
    ...
    9.9 I prefer to have to have Standard (Dimstyle and Style)
    in all my templates (I use only metrics)
     
    Marc'Antonio Alessi, Jun 7, 2004
    #16
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.