Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/07/2021 in all areas

  1. Sounds like you have people accessing files through UNC ? If so perhaps: (if (wcmatch (setq dp (getvar "DWGPREFIX")) "P:*") (strcat "\\\\company.lan\\center" (substr dp 3)) dp ) *EDIT Changed (substr dp 1 2) to (substr dp 3)
    1 point
  2. The forward, dbl back slashes depends a bit on file names etc if they have spaces use dbl back slashes. It is easier sometimes to just always use \\. But a syou can see / works for startapp. Yes its confusing. Dont ask about UNIX.
    1 point
  3. Something I have done in the past is to drag a line over multiple lines, you make a selection set, and use closestpointo to get a distance offset this is used in a sort list to make sure the order is correct. So your list would look like ((dist layer)(dist layer)(dist layer...... this way offsets do not matter v's hard coded in Ronjonp suggestion. You can then use this to do the offset left and right. I would not try to convert the existing multi lines rather create from offset to a master line. If you want this a lot, look into MLINE it supports layers. You can entmake a mline from scratch. Need to find an example. Thanks to Ronjonp saved me some coding providing solution to offset will use in future. ; Multi offset copying existing multi lines ; By AlanH July 2021 (defun c:foooo ( / pt1 pt2 ss lst obj obj2 lay sub 1stoff) (vl-load-com) ; just in case not loaded (setq pt1 (getpoint "\nPick first point on inside of wall :")) (setq pt2 (getpoint pt1 "\nPick second point on outside of wall :")) (setq 1stoff (getreal "\nEnter 1st offset value ")) (setq obj2 (vlax-ename->vla-object (car (entsel "\nPick object to offset ")))) (setq ss (ssget "F" (list pt1 pt2))) (setq lst '()) (repeat (setq x (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq x (- x 1))))) (setq lay (vla-get-layer obj)) (setq pt2 (vlax-curve-getclosestpointto obj pt1)) (setq dist (distance pt1 pt2)) (setq lst (cons (list dist lay) lst)) ) (setq sub (car (nth 0 lst))) (foreach n lst (vl-catch-all-apply 'vlax-invoke (list obj2 'offset (+ 1stoff (- (car n) sub)))) (setq ent (entget (entlast))) (entmod (subst (cons 8 (nth 1 n)) (assoc 8 ent) ent)) (vl-catch-all-apply 'vlax-invoke (list obj2 'offset (- (+ 1stoff (- (car n) sub))))) (setq ent (entget (entlast))) (entmod (subst (cons 8 (nth 1 n)) (assoc 8 ent) ent)) ) (princ) )
    1 point
  4. Look at this example (startapp "C:/Program Files (x86)/Adobe/Acrobat Reader DC/Reader/AcroRd32.exe" filename) Or do you mean (command "-pdfattch" filename pagenumber pt 1 0)
    1 point
×
×
  • Create New...