Jump to content

Recommended Posts

Posted

Hi. I am searchin for a lisp code to dimension second ground on cross section.

 

I start a code to move the second ground to GROUND2 layer.  The problem is that the cross section in not drawing in 0,H  (H is the datum elevetion). I have some instractions in the dwg file

 

(defun c:Test ()

  ;; Check if the layer exists, if not, create it
  (if (not (tblsearch "layer" "GROUND2"))
    (command "_layer" "_m" "GROUND2" "_c" "11" "" "") ; Create the layer with color index 11
  )

  (and (setq ss (ssget '((0 . "*POLYLINE"))))
       ((lambda (int / sn lst)
          (while (setq int (1+ int)
                       sn  (ssname ss int)
                 )
            (setq lst (entget sn))
            (entmod (subst '(8 . "GROUND2") (assoc 8 lst) lst))
          )
        )
         -1
       )
  )
  (princ)
)

 

Thanks

test.dwgFetching info...

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