Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/02/2020 in all areas

  1. I have 3 screens on my normal computer , only i5 cpu I'm afraid , and left screen is for email etc , middle for AutoCad and right screen has most of the time my VLIDE in it. Mainly because I constantly tweak my routines or just for fun when I'm bored with the work I'm doing. It never bugs me , well, almost never , have one routine , my batch app and when I run it with VLIDE open it always triggers the error trapping , but without VLIDE open the routine runs just fine. Probably need to do some better error trapping because it never shows me where it tripped , just that an error occurred. But for the rest I'm happy to have my editor open all the time. (makes me look smarter hahaha)
    1 point
  2. If you have Express Tools loaded type SYSVDLG on the command line and press enter. When the dialog opens type View* in the box top left.
    1 point
  3. Agree with ronjonp. Little mistake entmake a pline is actually a donut.
    1 point
  4. OK. With a drawing I can see why the first version didn't work properly, mainly through my stupidity. Try this. (vl-load-com) (defun c:mltp ( / *error* c_doc c_spc sv_lst sv_vals t_obj p_lst lyr p_vals ss cnt obj) (defun *error* (msg) (mapcar 'setvar sv_lst sv_vals) (if (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*EXIT*")) (princ (strcat "\nOops an Error : ( " msg " ) occurred."))) (princ) );end_error_on_defun (setq c_doc (vla-get-activedocument (vlax-get-acad-object)) c_spc (vlax-get-property c_doc (if (= 1 (getvar 'cvport)) 'paperspace 'modelspace)) sv_lst (list 'cmdecho 'osmode) sv_vals (mapcar 'getvar sv_lst) );end_setq (mapcar 'setvar sv_lst (list 0 0)) (setq t_obj (vlax-ename->vla-object (car (entsel "\nSelect Template Line : "))) p_lst (list 'linetypescale) lyr (vlax-get t_obj 'layer) );end_setq (mapcar '(lambda (x) (setq p_vals (cons (vlax-get-property t_obj x) p_vals))) p_lst) (setq p_vals (reverse p_vals) ss (ssget (list '(0 . "LINE") (cons 8 lyr))) );end_setq (cond (ss (repeat (setq cnt (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq cnt (1- cnt))))) (mapcar '(lambda (x y) (vlax-put-property obj x y)) p_lst p_vals) );end_repeat ) );end_cond (mapcar 'setvar sv_lst sv_vals) (princ) );end_defun This will only select lines on the same layer as the "template" line.
    1 point
  5. Just be aware that that method only works with certain entities, and won't work with entities which require subclass markers in the DXF data.
    1 point
  6. 1 point
  7. This should work too: (entmod (append entlist (list (cons 10 leftend1) (cons 11 leftend2))))
    1 point
  8. The reason that your original code does not work as expected is because the second entmod expression is still operating on the original DXF list bound to the variable entlist and therefore you will receive a result whereby DXF group 11 has the new value, and DXF group 10 has reverted back to its original value. There are many ways around this, but the easiest & most readable might be: (setq entlist (subst (cons 10 LeftEnd1) (assoc 10 entlist) entlist) entlist (subst (cons 11 LeftEnd2) (assoc 11 entlist) entlist) ) (entmod entlist) Alternatively, you can nest the subst expressions, e.g.: (entmod (subst (cons 11 LeftEnd2) (assoc 11 entlist) (subst (cons 10 LeftEnd1) (assoc 10 entlist) entlist)))
    1 point
  9. (entmakex (list '(0 . "DONUT") ………..Easier than hatching circle. Make inner rad real small 0.0001. Using command may be ok and fast enough very simple questions.
    1 point
×
×
  • Create New...