Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/16/2023 in all areas

  1. Drill down on what Steven is saying about lists. you want to use the layer variable in your ssget to do that you need to use (list and (cons to build a list that will be dynamic. currently when you run this code it use this ssget. twice for each "layer1" and "layer2" (ssget '((0 . "*POLYLINE") (8 . "layer") (-4 . "<OR") (70 . 1) (70 . 129) (-4 . "OR>"))) You want this ssget to be dynamic so you have to use (list and (cons like this. (ssget (list (0 . "*POLYLINE") (cons 8 layer) (-4 . "<OR") (70 . 1) (70 . 129) (-4 . "OR>"))) this will be evaluated as when the layer variable is processed. (ssget '((0 . "*POLYLINE") (8 . "LAYERl") (-4 . "<OR") (70 . 1) (70 . 129) (-4 . "OR>"))) (ssget '((0 . "*POLYLINE") (8 . "LAYER2") (-4 . "<OR") (70 . 1) (70 . 129) (-4 . "OR>"))) --edit and like steven didn't look past the ssget. so i don't know if their is any other errors.
    1 point
  2. I haven't tested this yet, but let me give you a lesson in lists.... see if you can work out the first problem I saw. So LISP - LISt Processing.... it is designed around lists but get them wrong and odd things happen. Lists can be made up in a few ways: A. (list ...... ) defines a list B. (cons .....) defines a list C. '(..... ) defines a list C. creates a fixed list and what is inside is not evaluated '(1 2 (+ 2 3)) is 3 items 1, 2, (+ 2 3) (ignoring the error that (+ 2 3) should be a sting) B. is mostly used in a dotted pair, such as (cons 0 "PolyLine") which might be used in say an ssget filter and is calculated, can be written as '(0 . "POLYLINE") A. is a generic list function and also creates a list allowing for calculations inside: (list 1 2 (+ 2 3)) is a 3 item list: (1 2 4) - calculation done, can be '(1 2 4) So in your function above if you have say a list like in C - fixed - and want to do a calculation or use a variable then it might go wrong See if that helps and take the hint of the example in B, example in ssget. Might be wrong, might not.
    1 point
  3. hello im analyzing your code , i need help with the second paragraph just after the "while loop". how vlax-curve-getPointAtDist and vlax-curve-getparamatpoint are being used here? Thanks Shay
    1 point
×
×
  • Create New...