problems ent,aking a dimstyle

Discussion in 'AutoCAD' started by Jamie Duncan, Apr 10, 2004.

  1. Jamie Duncan

    Jamie Duncan Guest

    This doesn't work:

    (entmake (list '(0 . "DIMSTYLE") '(2 . "arctitic") '(70 . 0) '(40 . 48.0) '(41 . 0.125) '(42 . 0.0625) '(43 . 0.315) '(44 . 0.06) '(46 . 0.09) '(140 . 0.078) '(141 . 0.09) '(142 . 0.0) '(143 . 25.4) '(147 . 0.03) '(73 . 0) '(74 . 0) '(77 . 1) '(78 . 3) '(172 . 1) '(176 . 256) '(177 . 256) '(178 . 256) '(270 . 4) '(cons 340 (tblobjname "style" "standard")) '(287 . 4)))

    neither does this

    (entmake (list '(0 . "DIMSTYLE") '(100 . "AcDbSymbolTableRecord") '(100 .. AcDbDimStyleTableRecord") '(2 . "arctitic") '(70 . 0) '(40 . 48.0) '(41 . 0.125) '(42 . 0.0625) '(43 . 0.315) '(44 . 0.06) '(46 . 0.09) '(140 . 0.078) '(141 . 0.09) '(142 . 0.0) '(143 . 25.4) '(147 . 0.03) '(73 . 0) '(74 . 0) '(77 . 1) '(78 . 3) '(172 . 1) '(176 . 256) '(177 . 256) '(178 . 256) '(270 . 4) '(cons 340 (tblobjname "style" "standard")) '(287 . 4)))


    any help is appreciated.

    Thanks
     
    Jamie Duncan, Apr 10, 2004
    #1
  2. Jamie Duncan

    Jeff Mishler Guest

    Jamie,
    When you have a (cons ...) in your list you cn't quote that line. So
    just remove the quote from:

    ....... '(cons 340 (tblobjname "style" "standard")) .......

    This works:

    (entmake (list '(0 . "DIMSTYLE")'(100 . "AcDbSymbolTableRecord") '(100 .
    "AcDbDimStyleTableRecord") '(2 . "arctitic") '(70 . 0) '(40 . 48.0)
    '(41 . 0.125) '(42 . 0.0625) '(43 . 0.315) '(44 . 0.06) '(46 . 0.09)
    '(140 . 0.078) '(141 . 0.09) '(142 . 0.0) '(143 . 25.4) '(147 . 0.03)
    '(73 . 0) '(74 . 0) '(77 . 1) '(78 . 3) '(172 . 1) '(176 . 256) '(177 .
    256) '(178 . 256) '(270 . 4) (cons 340 (tblobjname "style" "standard"))
    '(287 . 4)))

    HTH,
    Jeff

    This doesn't work:

    (entmake (list '(0 . "DIMSTYLE") '(2 . "arctitic") '(70 . 0) '(40 .
    48.0) '(41 . 0.125) '(42 . 0.0625) '(43 . 0.315) '(44 . 0.06) '(46 .
    0.09) '(140 . 0.078) '(141 . 0.09) '(142 . 0.0) '(143 . 25.4) '(147 .
    0.03) '(73 . 0) '(74 . 0) '(77 . 1) '(78 . 3) '(172 . 1) '(176 . 256)
    '(177 . 256) '(178 . 256) '(270 . 4) '(cons 340 (tblobjname "style"
    "standard")) '(287 . 4)))

    neither does this

    (entmake (list '(0 . "DIMSTYLE") '(100 . "AcDbSymbolTableRecord") '(100
    .. AcDbDimStyleTableRecord") '(2 . "arctitic") '(70 . 0) '(40 . 48.0)
    '(41 . 0.125) '(42 . 0.0625) '(43 . 0.315) '(44 . 0.06) '(46 . 0.09)
    '(140 . 0.078) '(141 . 0.09) '(142 . 0.0) '(143 . 25.4) '(147 . 0.03)
    '(73 . 0) '(74 . 0) '(77 . 1) '(78 . 3) '(172 . 1) '(176 . 256) '(177 .
    256) '(178 . 256) '(270 . 4) '(cons 340 (tblobjname "style" "standard"))
    '(287 . 4)))


    any help is appreciated.

    Thanks


    --
    Jamie Duncan

    "How wrong it is for a woman to expect the man to build the world she
    wants, rather than to create it herself."
    - Anais Nin (1903-1977)
     
    Jeff Mishler, Apr 11, 2004
    #2
  3. Couple things Jamie:

    The first way won't work. The second way will, and you're REAL
    close. You missed a leading quote on one of the 100 groups
    (AcDbDimStyleTableRecord) which will of course make acad chuck
    a wobbly, but even more code breaking is that you quoted the
    cons statement, so it never gets evaluated.

    A recurring thing I've noticed in your entmake posts (don't
    take offence) is that you tend to post the group codes as a
    stream, While convenient for acad, it makes it difficult to
    see what's wrong. Arranging it vertically (like I have below)
    makes it REAL easy to see where the problem is :).

    Also, if I can add a last suggestion, it isn't efficient for
    you to individually quoted all those cons pairs, just lump them
    into one or more quoted lists, then append as applicable to
    incorporate code that has to be evaluated at run time.

    For example:
    Code:
    
    (entmake
    (append
    '(  (0 . "DIMSTYLE")
    (100 . "AcDbSymbolTableRecord")
    (100 . "AcDbDimStyleTableRecord")
    (2 . "Arctitic")
    (70 . 0)
    (40 . 48.0)
    (41 . 0.125)
    (42 . 0.0625)
    (43 . 0.315)
    (44 . 0.06)
    (46 . 0.09)
    (140 . 0.078)
    (141 . 0.09)
    (142 . 0.0)
    (143 . 25.4)
    (147 . 0.03)
    (73 . 0)
    (74 . 0)
    (77 . 1)
    (78 . 3)
    (172 . 1)
    (176 . 256)
    (177 . 256)
    (178 . 256)
    (270 . 4)
    )
    (list
    (cons 340
    (tblobjname "style" "standard")
    )
    )
    '((287 . 4))
    )
    )
    :)

    This doesn't work:

    (entmake (list '(0 . "DIMSTYLE") '(2 . "arctitic") '(70 . 0) '(40 . 48.0) '(41 . 0.125) '(42 . 0.0625) '(43 . 0.315) '(44 . 0.06)
    '(46 . 0.09) '(140 . 0.078) '(141 . 0.09) '(142 . 0.0) '(143 . 25.4) '(147 . 0.03) '(73 . 0) '(74 . 0) '(77 . 1) '(78 . 3) '(172 .
    1) '(176 . 256) '(177 . 256) '(178 . 256) '(270 . 4) '(cons 340 (tblobjname "style" "standard")) '(287 . 4)))

    neither does this

    (entmake (list '(0 . "DIMSTYLE") '(100 . "AcDbSymbolTableRecord") '(100 . AcDbDimStyleTableRecord") '(2 . "arctitic") '(70 . 0) '(40
    .. 48.0) '(41 . 0.125) '(42 . 0.0625) '(43 . 0.315) '(44 . 0.06) '(46 . 0.09) '(140 . 0.078) '(141 . 0.09) '(142 . 0.0) '(143 . 25.4)
    '(147 . 0.03) '(73 . 0) '(74 . 0) '(77 . 1) '(78 . 3) '(172 . 1) '(176 . 256) '(177 . 256) '(178 . 256) '(270 . 4) '(cons 340
    (tblobjname "style" "standard")) '(287 . 4)))


    any help is appreciated.

    Thanks
     
    michael puckett, Apr 11, 2004
    #3
  4. Jamie Duncan

    Barr Guest

    Hi, girl from Canada -

    I bet it's the (cons 340...) line.
    I don't do entmaking (or ent,aking), but taht's the only element that doesn't
    match up to the definition of an existing dimstyle list in my drawing.

    Well you DID say that ANY help is appreciated.

    -boy from America

    ps - I still owe you a portrait of my dog
    Cilla.That's right on top of my list and
    I'm working my way up to it.

    This doesn't work:

    (entmake (list '(0 . "DIMSTYLE") '(2 . "arctitic") '(70 . 0) '(40 . 48.0) '(41 .
    0.125) '(42 . 0.0625) '(43 . 0.315) '(44 . 0.06) '(46 . 0.09) '(140 . 0.078)
    '(141 . 0.09) '(142 . 0.0) '(143 . 25.4) '(147 . 0.03) '(73 . 0) '(74 . 0) '(77
    .. 1) '(78 . 3) '(172 . 1) '(176 . 256) '(177 . 256) '(178 . 256) '(270 . 4)
    '(cons 340 (tblobjname "style" "standard")) '(287 . 4)))

    neither does this

    (entmake (list '(0 . "DIMSTYLE") '(100 . "AcDbSymbolTableRecord") '(100 .
    AcDbDimStyleTableRecord") '(2 . "arctitic") '(70 . 0) '(40 . 48.0) '(41 . 0.125)
    '(42 . 0.0625) '(43 . 0.315) '(44 . 0.06) '(46 . 0.09) '(140 . 0.078) '(141 .
    0.09) '(142 . 0.0) '(143 . 25.4) '(147 . 0.03) '(73 . 0) '(74 . 0) '(77 . 1)
    '(78 . 3) '(172 . 1) '(176 . 256) '(177 . 256) '(178 . 256) '(270 . 4) '(cons
    340 (tblobjname "style" "standard")) '(287 . 4)))


    any help is appreciated.

    Thanks


    --
    Jamie Duncan

    "How wrong it is for a woman to expect the man to build the world she wants,
    rather than to create it herself."
    - Anais Nin (1903-1977)
     
    Barr, Apr 11, 2004
    #4
  5. Jamie Duncan

    Jamie Duncan Guest

    oops! got carried away with the quotes!


    --
    Jamie Duncan

    "How wrong it is for a woman to expect the man to build the world she wants,
    rather than to create it herself."
    - Anais Nin (1903-1977)
     
    Jamie Duncan, Apr 11, 2004
    #5
  6. Jamie Duncan

    Jamie Duncan Guest

    thanks Michael!

    The format takes many lines :-( but is much more readable :) - this is good
    for lisp 'cause then there aren't any unbalanced frowns or smiles..


    Now that you both have helped I can take the next steps in my 'environment'
    routines.


    --
    Jamie Duncan

    "How wrong it is for a woman to expect the man to build the world she wants,
    rather than to create it herself."
    - Anais Nin (1903-1977)

    '(41 . 0.125) '(42 . 0.0625) '(43 . 0.315) '(44 . 0.06)
    .. 0.03) '(73 . 0) '(74 . 0) '(77 . 1) '(78 . 3) '(172 .
    (tblobjname "style" "standard")) '(287 . 4)))
    AcDbDimStyleTableRecord") '(2 . "arctitic") '(70 . 0) '(40
    0.09) '(140 . 0.078) '(141 . 0.09) '(142 . 0.0) '(143 . 25.4)
    256) '(177 . 256) '(178 . 256) '(270 . 4) '(cons 340
    wants, rather than to create it herself."
     
    Jamie Duncan, Apr 11, 2004
    #6
  7. Jamie Duncan

    Jamie Duncan Guest

    Hey DB!

    Would you like a nice pic of Ayla? She's gone back to heaven (sniff...) and
    I miss her so..

    I remember having sent you one or two some time ago - but I'm not sure if
    you have the one I'm thinking off...

    And yes - everyone's catching my improper quotes.. <g>
     
    Jamie Duncan, Apr 11, 2004
    #7
  8. < It's not enough to anymore to only know the dark side >

    Suggestion: Learn the activex side of things too :)

    Code:
    ;  oversimplified for clarity (ie not error trapped)
    (progn
    ;  ...
    (setq MyDimStyleObject
    (vlax-invoke-method
    (vlax-get-property
    (vlax-get-property
    (vlax-get-acad-object)
    'ActiveDocument
    )
    'DimStyles
    )
    'Add
    "MyDimStyle"
    )
    )
    ; ...
    )
    
     
    michael puckett, Apr 11, 2004
    #8
  9. Jamie Duncan

    Rudy Tovar Guest

    If you'll be using 2002+ you guys are in for a big surprise!

    Just so you know, certain dxf codes are not supported, and you'll have to
    use activeX.

    --

    AUTODESK
    Authorized Developer
    www.Cadentity.com
    MASi
     
    Rudy Tovar, Apr 12, 2004
    #9
  10. Jamie Duncan

    CAB2k Guest

    Is there a list of unsupported DXF codes??

    And Michael how do you get your code to display in a frame?
    I tried pre and /pre but there is no frame.
     
    CAB2k, Apr 12, 2004
    #10
  11. In the snip below replace the braces {} with square
    brackets [] ...

    {code}
    source code to be left intact
    {/code}

    It's something I picked up posting to other web based
    discussion groups that use UBB code (a variation of html).

    Of course, it desn't leave it completely intact (empty
    lines are dumped) but it's better than nothing I suppose.

    If you look here:

    http://discussion.autodesk.com/help.jspa

    You'll see a reference to the pre and /pre tags under the
    title "How do I include formatted code snippets in my
    message"? Specifically:

    Code:
    Include the code in the body of your message surrounded
    by [pre] and [/pre]. Note: Be sure to use square brackets
    as shown, not the angle brackets used for html tags.
    
    Other than that I have no idea what's going on (I'm on the
    nntp side). I'm not even sure if this very post will look
    any good on the web side (I would guess no - they've not
    done a very good job of it imooc).

    Cheers.

    Is there a list of unsupported DXF codes??

    And Michael how do you get your code to display in a frame?
    I tried pre and /pre but there is no frame.
     
    michael puckett, Apr 12, 2004
    #11
  12. Which ones would you like me to list?


    Is there a list of unsupported DXF codes??
     
    michael puckett, Apr 12, 2004
    #12
  13. Jamie Duncan

    Rudy Tovar Guest

    Yes it's well documented, but kinda fun how I found it.

    I had to dig for it, because of blocks I was defining in the dxf code.

    As for the overall, you'd better move over to activex, because a lot more
    dxf codes will no longer be supported, and the only way to gain access will
    be through activex.
    --

    AUTODESK
    Authorized Developer
    www.Cadentity.com
    MASi
     
    Rudy Tovar, Apr 12, 2004
    #13
  14. Thank you for the information. Not that I doubt you, but as I prepare to
    implement 2004 I need to revise about 200+ lisp routines and need to have
    this confirmed. I know nothing of activex, nor do I know whetehr activex
    will be supported in a couple of years, so before throwing out reams of code
    I need an answer from ADESK, or at least a link to where ADESK has set out
    their offical position.

    --


    Jamie Duncan

    Consulting - If you're not part of the solution, there's good money in
    prolonging the problem.
     
    Jamie Duncan \(remove lock to reply\), Apr 12, 2004
    #14
  15. Jamie Duncan

    Mark Propst Guest

    good luck :)
     
    Mark Propst, Apr 12, 2004
    #15
  16. Jamie Duncan

    Rudy Tovar Guest

    Jamie, Activex is part of VisualLISP that comes with 2000+ already, free.

    And Autodesk is still refining and adding to it.

    It's been documented in 2004 that what will be disappearing is DXF codes,
    and will be only accessable through activex or should I say VisualLISP.

    2005 comes with VisualLISP and so will the coming versions.

    If you're unsure about what to get into, then consider .NET using ObjectARX.

    If you need more confirmation, just read the ActiveX portion in the
    documentation.
    --

    AUTODESK
    Authorized Developer
    www.Cadentity.com
    MASi
     
    Rudy Tovar, Apr 12, 2004
    #16
  17. Jamie Duncan

    Jamie Duncan Guest

    Thanks Rudy,

    So, for my 2004 roll-out - which I've just begun, dxf codes are still going
    to be okay?

    seems that way from the tests I've done...

    so 2005 is when we see dxf go bye bye?

    I've got menu issues, and weird button issues - but that is another
    group....

    <g>


    --
    Jamie Duncan

    "How wrong it is for a woman to expect the man to build the world she wants,
    rather than to create it herself."
    - Anais Nin (1903-1977)
     
    Jamie Duncan, Apr 13, 2004
    #17
  18. Jamie Duncan

    CAB2k Guest

    Thanks for the info, I was aware of pre /pre but had not seen info
    on code /code.
     
    CAB2k, Apr 13, 2004
    #18
  19. Jamie Duncan

    CAB2k Guest

    Why all of them of course :)

    But I'll start digging into the 2004 help file.

    CAB
     
    CAB2k, Apr 13, 2004
    #19
  20. Jamie Duncan

    Rudy Tovar Guest

    Bit by bit some will be going, but would just suggest that you become a
    custom to the new functions, and take advantage of what they have to offer.

    I made the mistake of entmaking everthing, which I later had to re-write it
    into parts that I could modify to accomodate changes in object creation.
     
    Rudy Tovar, Apr 13, 2004
    #20
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.