Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/20/2022 in all areas

  1. @jr.roberto.santos All those blocks 'ASSYCODE' values are EXCLUDE not EXCEPT .. that's why it does not work. I updated the code above so try again .. if you change that one block's attribute to 'EXCEPT' it works..
    1 point
  2. and there was a thread recently copying text to clipboard if you want to copy straight to clipboard as well (my first comment here, 3rd line in the code with a couple of easy changes. https://www.cadtutor.net/forum/topic/74896-get-blockname-and-copy-in-memory/ )
    1 point
  3. Just another suggestion say you have csv "1,2,3,4,5,6,7" convert to a list as suggested (1 2 3 4 5 6 7) so I don't want 1st 2 items I use the nth function on the list the only thing to remember is that the 1st item is zero not 1. (nth 2 lst) = 3 (nth 4 lst)= 5 and so on. You can also look at car functions (car lst) = 1 (cadr lst) = 2 (caddr lst) = 3 and so on.
    1 point
  4. Like stevenP lets go back a couple of steps like how are you getting the chainages in the 1st place ? If its pick a point then do just that pick a point and write the chainage label on to the pline. (vla-curve-getclosestpointto obj_vlx pt) To me looks like you have picked specific objects for the PDF.
    1 point
  5. Second comment is how often will you be doing this? If it is a one off thing, or not often, then you can maybe ignore the excel to LISP part, just copy the data and hard code it to this chainage LISP, save a job and source of errors in programming
    1 point
  6. So what help do you need? I don't know your skill level and if you have a library of LISPS that you use, so where do we start to help you? For example, starting at the beginning, can you create a LISP routine (doesn't have to be complicated), can you get a routine to reference others, have you got one that can read from excel.... so where do we start to help you? So the first part of your problem, there are a lot of routines out there that will read from an excel file - have you found any of them and can you get your excel data into a variable or a list in a LISP? Then there are chainage LISPs too which will put a marker every so often, either a regular distance or a user specified distance, again have you found any of them? Might be that you just need help combining the 2 together you see. So let us know where to start with the help and I am sure most of us will be happy to give you some snippets of advice, you might get lucky and LISP from someones library that does the same (I have a chainage LISP for example, can't remember where I got it from but that only does a constant distance between points and not a variable one, would need altering a touch) Edit Here: I think this is the piece of code that gets the points along a polyline.. everything else in the LISPs are just doing stuff, but think this is the line you will probably be struggling to find out (setq list_pt (vlax-curve-getPointAtDist obj_vlax total_Chain_distance) )
    1 point
  7. For a command to work in multiple languages I think it should have "_." before any command used, so it can be translated to the original code language which is english, but if the author of the Vlx omited the dot I think you can't get it to work in another language, maybe there is some code here in the posts that can solve your needs, what does the program do?
    1 point
  8. Should be what your looking for. (defun C:PP (/ SS vla SPT MPT EPT) (prompt "\nSelect Polylines") (if (setq SS (ssget '((0 . "*POLYLINE")))) (foreach poly (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS))) (setq vla (vlax-ename->vla-object poly) SPT (vlax-curve-getStartPoint vla) MPT (vlax-curve-getPointAtDist vla (/ (vlax-get-property vla 'length) 2.0)) EPT (vlax-curve-getendpoint vla) ) (entmake (list '(0 . "POINT") (cons 10 SPT))) (entmake (list '(0 . "POINT") (cons 10 MPT))) (entmake (list '(0 . "POINT") (cons 10 EPT))) ) ) (princ) )
    1 point
×
×
  • Create New...