Results 1 to 5 of 5

Thread: Routine to convert a .LSP file to a .FAS file - need someone to give it the once over

  1. #1
    I could stop if I wanted to
    Join Date
    2005-08
    Posts
    378
    Login to Give a bone
    0

    Cool Routine to convert a .LSP file to a .FAS file - need someone to give it the once over

    Guys,
    A simple routine to convert my LISP into a FAS file.
    It all works fine accept one simple error i'm not seeing with the "IF" function.
    I wanted it to check if the FAS file being created already existed and then prompt you to overwrite it. Don't get me wrong, It does do that though it always does that, even if the file doesn't exist.
    I think I have something wrong with the first "IF" function and it is going straight on to the next "IF" function.

    Could someone please have a look as i can't see what i have done wrong.

    Regards

    Stephen
    Attached Files Attached Files

  2. #2
    I could stop if I wanted to
    Join Date
    2015-08
    Posts
    263
    Login to Give a bone
    0

    Default Re: Routine to convert a .LSP file to a .FAS file - need someone to give it the once over

    Quote Originally Posted by stephen.coff
    Could someone please have a look as i can't see what i have done wrong.
    Stephen,

    I think it's typo error, though I didn't test it. Instead of
    Code:
    (if (= findfas "nil")
    try

    Code:
    (if (= findfas nil)
    or you may use

    Code:
    (if (not findfas)
    I didn't go through all the codes. So if you still have problems, please let us know.

    Regards,
    Abdul Huck

  3. #3
    I could stop if I wanted to
    Join Date
    2005-08
    Posts
    378
    Login to Give a bone
    0

    Cool Re: Routine to convert a .LSP file to a .FAS file - need someone to give it the once over

    abdulhuck,
    I tried as you suggested though neither worked. The only thing that actually works is with the (= findfas "nil").
    That said it doesuse the if command properly ? I don't know.

    Stephen

  4. #4
    I could stop if I wanted to
    Join Date
    2015-08
    Posts
    263
    Login to Give a bone
    0

    Default Re: Routine to convert a .LSP file to a .FAS file - need someone to give it the once over

    Quote Originally Posted by stephen.coff
    abdulhuck,
    I tried as you suggested though neither worked. The only thing that actually works is with the (= findfas "nil").
    That said it doesuse the if command properly ? I don't know.
    Stephen
    Sorry Stephen, initially I didn't go through your code completely. Now it is ok. Your code was fine except instead of "/" you used "\" to declare local variables. I also changed (initget 1 "Yes No") to (initget "Yes No") as bit codes not required to get key words.

    Regards,
    Abdul Huck
    Attached Files Attached Files

  5. #5
    Member
    Join Date
    2003-06
    Posts
    8
    Login to Give a bone
    0

    Default Re: Routine to convert a .LSP file to a .FAS file - need someone to give it the once over

    Quote Originally Posted by stephen.coff
    Guys,
    A simple routine to convert my LISP into a FAS file.
    It all works fine accept one simple error i'm not seeing with the "IF" function.
    I wanted it to check if the FAS file being created already existed and then prompt you to overwrite it. Don't get me wrong, It does do that though it always does that, even if the file doesn't exist.
    I think I have something wrong with the first "IF" function and it is going straight on to the next "IF" function.

    Could someone please have a look as i can't see what i have done wrong.

    Regards

    Stephen


    lisp to fas:
    open VisualLISP editor (vlide)
    File....Make new application wizard
    select your project folder & project name
    add your lisp file
    finish (build application)
    go to your project folder and you can see the new fas file

Similar Threads

  1. Replies: 1
    Last Post: 2008-10-14, 02:32 AM
  2. Replies: 0
    Last Post: 2008-10-13, 10:20 PM
  3. Replies: 19
    Last Post: 2007-10-17, 03:11 PM
  4. How I can convert a file of coordinate N, E and Z for a file .FBK (Fieldbook file)
    By CARLOS.NORONHA in forum AutoCAD Civil 3D - General
    Replies: 7
    Last Post: 2006-06-15, 07:35 PM
  5. convert inventor file to mechanical desktop file
    By daominhtri01 in forum MDT - General
    Replies: 2
    Last Post: 2005-09-01, 08:40 AM

Posting Permissions

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