Jump to content

Help, Importing a .txt Table to Cad


NEXTMARCUS

Recommended Posts

  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

  • NEXTMARCUS

    11

  • CADWarrior

    5

  • Bill Tillman

    4

  • BIGAL

    2

Top Posters In This Topic

1 question, what this function progn do exactly?

 

(progn

 

Is used after an IF statement to indicate you have multiple statements to follow. If you have only one statement in the IF code, then you can omit the (progn. And of course you can have multiple (progn to nest your IF statements. It's similar to THEN, ELSE or ELSEIF when programming in other languages like VB. I sometimes have trouble with a block of code and a missing (progn is usually the culprit.

 

(if (= x 1)
 (progn
    (command "._LINE" pt1 pt2 "")
    (command "._LINE" pt3 pt4 "")
    .
    .   (do some more stuff if needed)
    .
 ); end progn[color="red"] (only execute the above lines if the IF was True)[/color]
 (progn
   (command "._LINE" pt5 pt6 "")
   (command "._LINE" pt7 pt8 "")
 ); end progn[color="red"] (only execute if the IF was not True)[/color]
); end if

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...