Results 1 to 3 of 3

Thread: Performing a task at intersection of specific layers.

  1. #1
    I could stop if I wanted to
    Join Date
    2015-12
    Posts
    385
    Login to Give a bone
    0

    Default Performing a task at intersection of specific layers.

    With a little of help from people here, I have gotten very far in my programming.

    I am trying to construct a lisp and here's where I am getting stuck.
    I want to identify all points where a apecific layer intersects with another specific layer

    below is where I am starting and my thoughts so far. Any help is greatly appreciated.

    Code:
    (defun c:foo (/ ss1)
      (setq ss1 (ssget '((0 . "LINE,LWPOLYLINE,POLYLINE")(8 . "P-CW,P-HW"))))
      **foreach intersection of "P-CW" & "P-HW" (foo-circle)**
      ;see attached image for clarification
      (princ))
    
    
    (defun foo-circle ()  
      (command "circle" **specified intersection** "d" 0.083)
      (princ "foo-trim has run")
      (princ))
    Thanks in advance,
    Andre
    Attached Images Attached Images

  2. #2
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: Performing a task at intersection of specific layers.

    Quote Originally Posted by ReachAndre View Post
    With a little of help from people here, I have gotten very far in my programming.

    I am trying to construct a lisp and here's where I am getting stuck.
    I want to identify all points where a apecific layer intersects with another specific layer

    below is where I am starting and my thoughts so far. Any help is greatly appreciated...
    ....
    Thanks in advance,
    Andre

    Code:
    (defun c:foo (/ ss1 _39 p-cw p-hw ss1 e v)
      (setq	_3p (lambda (lst)
    	      (if lst
    		(cons (list (car lst) (cadr lst) (caddr lst))
    		      (_3p (cdddr lst))
    		)
    	      )
    	    )
      )
      (if (setq P-CW nil
    	    P-hW nil
    	    ss1	 (ssget	'((0 . "LINE,LWPOLYLINE,POLYLINE") (8 . "P-CW,P-HW"))
    		 )
          )
        (progn
          (repeat (setq i (sslength ss1))
    	(setq e (vlax-ename->vla-object (ssname ss1 (setq i (1- i)))))
    	(if (eq (vla-get-layer e) "P-CW")
    	  (setq P-CW (cons e P-CW))
    	  (setq P-HW (cons e P-HW))
    	)
          )
          (foreach itm P-CW
    	(foreach mti P-HW
    	  (if
    	    (setq v (vlax-invoke itm 'IntersectWith mti acExtendNone))
    	     (foreach int (_3p v)
    	       (command "circle" "_non" int "d" 0.083);<--- your foo-circle
    	     )
    	  )
    	)
          )
        )
      )
      (princ)
    )
    HTH

  3. #3
    I could stop if I wanted to
    Join Date
    2015-12
    Posts
    385
    Login to Give a bone
    0

    Default Re: Performing a task at intersection of specific layers.

    Never did say thanks. Sorry for the delay. Thanks pbjese.

Similar Threads

  1. How to export specific material layers in a wall
    By Kaarsholm in forum Revit Architecture - General
    Replies: 1
    Last Post: 2012-02-02, 08:14 AM
  2. Overrules : Applying to specific layers only
    By brendan.j.mallon in forum Dot Net API
    Replies: 0
    Last Post: 2009-12-22, 05:44 AM
  3. Checking for specific layers
    By cwcrouch in forum AutoLISP
    Replies: 6
    Last Post: 2008-01-28, 02:34 PM
  4. Replies: 13
    Last Post: 2007-03-19, 11:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •