Jump to content

Set_Tile Problem


satishrajdev

Recommended Posts

Where am i making mistake??? Tiles are setting up with variables

 

  (MAPCAR
   '(LAMBDA (X)
      (IF (OR (EQUAL (EVAL (CAR X)) NIL) (EQUAL (EVAL (CAR X)) ""))
 (SET (CAR X) (CADR X))
 [color="red"](SET_TILE (VL-PRIN1-TO-STRING (CAR X)) (EVAL (CAR X))) [/color]
      )
    )
   (LIST (LIST 'ALS$HT "")
  (LIST 'ALS$WD ""))
)

Link to comment
Share on other sites

I would suggest:

(mapcar
  '(lambda ( sym val )
       (if (member (eval (read sym)) '(nil ""))
           (set (read sym) val)
           (set_tile sym (eval (read sym)))
       )
   )
  '("ALS$HT" "ALS$WD") '("" "")
)

Or

(foreach sym '("ALS$HT" "ALS$WD")
   (if (not (setq val (eval (read sym))))
       (set (read sym) "")
       (set_tile sym val)
   )
)

Or:

(foreach sym '(ALS$HT ALS$WD)
   (if (not (eval sym))
       (set sym "")
       (set_tile (vl-symbol-name sym) (eval sym))
   )
)

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...