Cant get this to work in 2004

Discussion in 'AutoCAD' started by Brett Harbourne, Aug 11, 2003.

  1. I have this routine which sort of adds to the revcloud command by inserting
    a triangle with the current revision number. I cant get it to work in 2004
    and was wondering if someone can please take a look at it. Here it
    is ---------->

    (defun C:CD ()
    (setq dims (getvar "dimscale"))
    (setvar "dimscale" 15)
    (c:revcloud)
    (COMMAND "INSERT" "K:/TVS
    Database/2-Drafting/F-Symbols/TRNGL.DWG" pause "" "" "")
    (SETQ P1 (getvar "LASTPOINT"))
    (COMMAND "DTEXT" "S" "TVS" P1 "2.5" "" pause)
    (setvar "dimscale" dims)
    (princ)
    )

    Thanks
    Brett
     
    Brett Harbourne, Aug 11, 2003
    #1
  2. Brett Harbourne

    Walt Engle Guest

    I am not a lisp programmer, but take a look at your file and see if you don't
    have one too many quotes immediately in front of the K:/TVS (i.e., "K:/TVS
    should be K:/TVS?)
     
    Walt Engle, Aug 11, 2003
    #2
  3. Brett Harbourne

    James Murphy Guest

    Walt,
    I don't think it's one too many, looks like he left off the one at the end.
    (command "insert" "K:/TVS" )
    Cut & paste in here may of caused that.
    BTW I don't have R2004 here(home) to test this on.

    Murph

    ">
     
    James Murphy, Aug 11, 2003
    #3
  4. Brett Harbourne

    Walt Engle Guest

    As I said, I am not a lisp programmer but I "fiddled" with it and it works - up
    to a point: I don't have revcloud (I use something else) and I don't have your
    triangle. See below for correction (I think):

    (defun C:CD ()
    (setq dims (getvar "dimscale"))
    (setvar "dimscale" 15)
    (c:revcloud)
    (COMMAND "INSERT" "K:/TVS"
    "Database/2-Drafting/F-Symbols/TRNGL.DWG" pause "" "" "")
    (SETQ P1 (getvar "LASTPOINT"))
    (COMMAND "DTEXT" "S" "TVS" P1 "2.5" "" pause)
    (setvar "dimscale" dims)
    (princ)
    )
     
    Walt Engle, Aug 11, 2003
    #4
  5. Brett Harbourne

    Mark Propst Guest

    I would assume that "K:/TVSDatabase/2-Drafting/F-Symbols/TRNGL.DWG"
    was his block name.
    I can't imagine how your line :

    (COMMAND "INSERT" "K:/TVS"
    "Database/2-Drafting/F-Symbols/TRNGL.DWG" pause "" "" "")

    doesnt' error with something like
    Point or option keyword required.
    Specify insertion point or [Scale/X/Y/Z/Rotate/PScale/PX/PY/PZ/PRotate]:
     
    Mark Propst, Aug 11, 2003
    #5
  6. Brett Harbourne

    Walt Engle Guest

    I don't know. It worked up to the point where I didn't have the
    sub-directory and trngl.dwg
     
    Walt Engle, Aug 11, 2003
    #6
  7. Brett Harbourne

    Nauman M Guest

    maybe try adding a hyphen in from of the insert command and dtext
    command

    ie
    (COMMAND "-INSERT" "K:/TVSDatabase/2-Drafting/F-Symbols/TRNGL.DWG" pause
    "" "" "")

    and try copy pasting this command line and see what the promots are. the
    prompt might have chanaged, so you have to adject there as well.
     
    Nauman M, Aug 11, 2003
    #7
  8. Thanks for your replies guys. Yes
    "K:/TVSDatabase/2-Drafting/F-Symbols/TRNGL.DWG" is the full path.

    Jamie, I'll give your suggestion a go and let you know.

    Thanks
    Brett
     
    Brett Harbourne, Aug 12, 2003
    #8
  9. Brett Harbourne

    James Murphy Guest

    I think you are right,. I was thinking the database/2........... and such
    were variables for the insertion point scale and rotation.

    Murph

     
    James Murphy, Aug 12, 2003
    #9
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.