Results 1 to 7 of 7

Thread: acet-laytrans

  1. #1
    Member
    Join Date
    2009-02
    Posts
    2
    Login to Give a bone
    0

    Default acet-laytrans

    Good day Yo.
    Re: http://blog.jtbworld.com/2007/05/tra...ytrans-on.html
    The use of the LISP function requires that you have already created and saved a layer translation mapping using the dialog version. The syntax is as follows:
    (acet-laytrans <file name> [<bits>])

    I did just that- manually translating using the dialog then saved the translation mapping.
    Opened the next drawing again entered (acet-laytrans "std.dws") at prompt it works.
    However when I created a batch.bat file with script to load (acet-laytrans "std.dws") didn't work and got an " ; error: no function definition: ACET-LAYTRANS "
    I reckoned the mapped is resident only when I opened autocad 1st time and do the laytrans.
    so how do I keep that mapped from dissapearing? anyone please..thanks!!

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: acet-laytrans

    Add this line before (acet-laytrans "std.dws") :
    Code:
     (or (member "laytrans.arx" (arx)) (arxload "laytrans"))
    It's not being loaded is the only reason I can think of for that error.

  3. #3
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: acet-laytrans

    Quote Originally Posted by Tom Beauford View Post
    It's not being loaded is the only reason I can think of for that error.
    That's probably what's happening. If you issue the normal LAYTRANS command, ACad checks if the ARX file is loaded already, if not it loads this. Therefore when you next type (acet-laytrans ....) at the command prompt the function is already loaded to RAM. But when you issue this from a SCR the command did not occur, thus the ARX is not loaded.

    Easy way, similar to Tom's: just add (arxload "laytrans") before the call to (acet-laytrans ...) - as you know it will not have been loaded for a SCR, no need to check if it has been loaded already.

    BTW, welcome to AUGI & congrats on your 1st post.

  4. #4
    Member
    Join Date
    2009-02
    Posts
    2
    Login to Give a bone
    0

    Default Re: acet-laytrans

    Good day Yo Gentlemen.
    Thank you very much indeed- got it, it works and my script runs like a breeze!!
    Appreciate the help.

  5. #5
    100 Club
    Join Date
    2008-08
    Location
    Vancouver, BC
    Posts
    105
    Login to Give a bone
    0

    Default Re: acet-laytrans

    Great, I can use this within autolisp!:
    (arxload "laytrans")
    (acet-laytrans "myfile.dws")

    Hey I just found this thread and it is the answer to my problem with LAYMRG not working properly in some drawings in this thread:

    http://forums.augi.com/showthread.php?t=103842

    Thanks all!

  6. #6
    Woo! Hoo! my 1st post
    Join Date
    2022-03
    Posts
    1
    Login to Give a bone
    0

    Default Re: acet-laytrans

    Quote Originally Posted by irneb View Post
    That's probably what's happening. If you issue the normal LAYTRANS command, ACad checks if the ARX file is loaded already, if not it loads this. Therefore when you next type (acet-laytrans ....) at the command prompt the function is already loaded to RAM. But when you issue this from a SCR the command did not occur, thus the ARX is not loaded.

    Easy way, similar to Tom's: just add (arxload "laytrans") before the call to (acet-laytrans ...) - as you know it will not have been loaded for a SCR, no need to check if it has been loaded already.

    BTW, welcome to AUGI & congrats on your 1st post.
    Hello,

    This is my first post in Forum. Thanks for the suggestion . I am running Laytrans through my AutoLISP.
    Code:
    (defun laytr ()
      (vl-load-com)
      (arxload "laytrans")
    ;;;Layer translate
      (or (member "laytrans.arx" (arx)) (arxload "laytrans"))
      (acet-laytrans "D:/Samirs Info/Technical Data/ADNOC/LISP Test/Site_Grad_layTrans.dwg" 7)
    )
    How ever I get this error

    Exception in ACET-LAYTRANS ARX COMMAND

    Laytrans_Exception.jpg

    It proceeds the program after clicking OK, but then I would not be able to run it through a script on multiple files.
    Please advise.
    Samir.
    Last edited by Ed Jobe; 2022-03-02 at 05:24 PM. Reason: Added code tags

  7. #7
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: acet-laytrans

    Quote Originally Posted by samirjoshi837799507 View Post
    Hello,

    (acet-laytrans "D:/Samirs Info/Technical Data/ADNOC/LISP Test/Site_Grad_layTrans.dwg" 7)

    How ever I get this error

    Exception in ACET-LAYTRANS ARX COMMAND

    It proceeds the program after clicking OK, but then I would not be able to run it through a script on multiple files.
    Please advise.
    Samir.
    I believe it's expecting a dws file and you're trying to use a dwg file.
    Try converting and using the dws file.

Similar Threads

  1. Laytrans Help
    By meb4527 in forum AutoCAD General
    Replies: 1
    Last Post: 2009-10-21, 08:27 PM
  2. CAD Standards Checker - Layer Translate (laytrans)
    By jrebennack in forum AutoCAD General
    Replies: 1
    Last Post: 2006-09-25, 09:03 PM
  3. LAYTRANS help
    By darthyoga in forum AutoCAD General
    Replies: 1
    Last Post: 2005-03-26, 03:13 PM
  4. LAYTRANS ?
    By CADTigress in forum AutoCAD General
    Replies: 9
    Last Post: 2004-10-15, 06:48 PM

Posting Permissions

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