<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Modify lisp to work only at certain angles and others... in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8407769#M96724</link>
    <description>&lt;P&gt;I attached my test file.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;this lisp does not worh&amp;nbsp;with red block in my drawing file.&lt;/P&gt;</description>
    <pubDate>Sat, 17 Nov 2018 01:29:25 GMT</pubDate>
    <dc:creator>jtm2020hyo</dc:creator>
    <dc:date>2018-11-17T01:29:25Z</dc:date>
    <item>
      <title>Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8400029#M96720</link>
      <description>&lt;P&gt;I have this lisp created for&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5869979"&gt;@dbhunia&lt;/a&gt;&amp;nbsp;and work great.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This lisp&amp;nbsp;creates a line between one-block -in-whole-drawing to nearest blocks:&lt;/P&gt;&lt;PRE&gt;(defun C:BBL ( / )
(vl-load-com)
(setq SB_lst nil)
(setq NB_lst nil)
(princ "\nSelect a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)")
(Setq SB_Name (cdr (assoc 2 (entget(car(entsel)))))) 
(Setq selectionset (ssget "_A" '((0 . "INSERT"))))
(repeat (setq N (sslength selectionset))
	(setq Data (ssname selectionset (setq N (- N 1))))
	(setq EntityData (entget Data))
	(setq B_Name (cdr (assoc 2 EntityData)))
	(setq BP_Block (cdr (assoc 10 EntityData)))
	(if (= SB_Name B_Name)
		(setq SB_lst (cons BP_Block SB_lst))
		(setq NB_lst (cons BP_Block NB_lst))
	)
)
(repeat (setq N (length SB_lst))
	(setq BP_SB (nth (setq N (- N 1)) SB_lst))
	(setq DIS_lst nil)
	(repeat (setq N1 (length NB_lst))
		(setq BP_NB (nth (setq N1 (- N1 1)) NB_lst))
	    	(setq PD (distance BP_SB BP_NB))
		(setq DIS_lst (cons PD DIS_lst))
	)
(setq LDP (vl-position (apply 'min DIS_lst) DIS_lst))
(setq NP (nth LDP NB_lst))
(command "line" BP_SB NP "")
(princ)
)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...but I need more option:&lt;BR /&gt;1 just to work at certain angles. I need draw a pline&amp;nbsp;between selected block and their nearest block but that is above base point (90 grades).&amp;nbsp;Angle might be a variable.&lt;BR /&gt;2 just to work at the selected block of distinct&amp;nbsp;names&lt;BR /&gt;3 link selected blocks to one block with a certain name or a layer with a certain&amp;nbsp;name.&lt;BR /&gt;&lt;BR /&gt;...I think those request will help a lot of people.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;image explain how I need request 1:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 818px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/569198i21A37AFD75012D79/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 22:46:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8400029#M96720</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-13T22:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8400848#M96721</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As your requirement......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;...................................&lt;P&gt;...but I need more option:&lt;BR /&gt;1 just to work at certain angles. I need draw a pline&amp;nbsp;between selected block and their nearest block but that is above base point (90 grades).&amp;nbsp;Angle might be a variable.&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;2 just to work at the selected block of distinct&amp;nbsp;names&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;3 link selected blocks to one block with a certain name or a layer with a certain&amp;nbsp;name.&lt;/FONT&gt;&lt;BR /&gt;...............................&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this ......... (Blue one has been taken care.......)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun C:BBL (/);;Put Temp Variables here.....
(vl-load-com)
(setq SB_lst nil)
(setq NB_lst nil)
(Setq SB_Name (cdr (assoc 2 (entget(car(entsel "\nSelect a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)")))))) 
(Setq selectionset_SB (ssget "_A" (list '(0 . "INSERT") (cons 2 SB_Name))))
(initget 1 "Block Layer")
(setq NBO (getkword "\nSelect Nearest Objects by [Block Name/Layer Name]: "))
(if (= NBO "Block")
	(progn
		(princ "BLOCK")
		(Setq NSB (cdr (assoc 2 (entget(car(entsel "\nSelect a Nearby Block upto which you want to draw line...."))))))
		(Setq selectionset_NB (ssget "_A" (list '(0 . "INSERT") (cons 2 NSB))))
	)
	(progn
		(princ "LAYER")
		(Setq NSBL (cdr (assoc 8 (entget(car(entsel "\nSelect a Object for Layer which contain Nearby Block upto which you want to draw line...."))))))
		(Setq selectionset_NB (ssget "_A" (list '(0 . "INSERT") (cons 8 NSBL))))
	)
)
(repeat (setq N (sslength selectionset_SB))
	(setq BP_Block (cdr (assoc 10 (entget (ssname selectionset_SB (setq N (- N 1)))))))
	(setq SB_lst (cons BP_Block SB_lst))
)
(repeat (setq N (sslength selectionset_NB))
	(setq BP_Block (cdr (assoc 10 (entget (ssname selectionset_NB (setq N (- N 1)))))))
	(setq NB_lst (cons BP_Block NB_lst))
)
(repeat (setq N (length SB_lst))
	(setq BP_SB (nth (setq N (- N 1)) SB_lst))
	(setq DIS_lst nil)
	(repeat (setq N1 (length NB_lst))
		(setq BP_NB (nth (setq N1 (- N1 1)) NB_lst))
	    	(setq PD (distance BP_SB BP_NB))
		(setq DIS_lst (cons PD DIS_lst))
	)
(setq LDP (vl-position (apply 'min DIS_lst) DIS_lst))
(setq NP (nth LDP NB_lst))
(command "_.pline" BP_SB NP "")
(princ)
)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Your 1st requirement (after looking the attached Image) I did not get your point.........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;What do you mean by "&lt;SPAN&gt;certain angles&lt;/SPAN&gt;" the "PLINE" angle .... connecting the base points of two Block.......?&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &lt;SPAN&gt;What do you mean by&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;"90 grades" ........ difference of Y co-ordinate of two base points.......?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3&amp;nbsp; What about 180 degree in&amp;nbsp;attached Image....?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 09:47:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8400848#M96721</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-11-14T09:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8402994#M96722</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5869979"&gt;@dbhunia&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As your requirement......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;...................................&lt;P&gt;...but I need more option:&lt;BR /&gt;1 just to work at certain angles. I need draw a pline&amp;nbsp;between selected block and their nearest block but that is above base point (90 grades).&amp;nbsp;Angle might be a variable.&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;2 just to work at the selected block of distinct&amp;nbsp;names&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;3 link selected blocks to one block with a certain name or a layer with a certain&amp;nbsp;name.&lt;/FONT&gt;&lt;BR /&gt;...............................&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this ......... (Blue one has been taken care.......)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun C:BBL (/);;Put Temp Variables here.....
(vl-load-com)
(setq SB_lst nil)
(setq NB_lst nil)
(Setq SB_Name (cdr (assoc 2 (entget(car(entsel "\nSelect a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)")))))) 
(Setq selectionset_SB (ssget "_A" (list '(0 . "INSERT") (cons 2 SB_Name))))
(initget 1 "Block Layer")
(setq NBO (getkword "\nSelect Nearest Objects by [Block Name/Layer Name]: "))
(if (= NBO "Block")
	(progn
		(princ "BLOCK")
		(Setq NSB (cdr (assoc 2 (entget(car(entsel "\nSelect a Nearby Block upto which you want to draw line...."))))))
		(Setq selectionset_NB (ssget "_A" (list '(0 . "INSERT") (cons 2 NSB))))
	)
	(progn
		(princ "LAYER")
		(Setq NSBL (cdr (assoc 8 (entget(car(entsel "\nSelect a Object for Layer which contain Nearby Block upto which you want to draw line...."))))))
		(Setq selectionset_NB (ssget "_A" (list '(0 . "INSERT") (cons 8 NSBL))))
	)
)
(repeat (setq N (sslength selectionset_SB))
	(setq BP_Block (cdr (assoc 10 (entget (ssname selectionset_SB (setq N (- N 1)))))))
	(setq SB_lst (cons BP_Block SB_lst))
)
(repeat (setq N (sslength selectionset_NB))
	(setq BP_Block (cdr (assoc 10 (entget (ssname selectionset_NB (setq N (- N 1)))))))
	(setq NB_lst (cons BP_Block NB_lst))
)
(repeat (setq N (length SB_lst))
	(setq BP_SB (nth (setq N (- N 1)) SB_lst))
	(setq DIS_lst nil)
	(repeat (setq N1 (length NB_lst))
		(setq BP_NB (nth (setq N1 (- N1 1)) NB_lst))
	    	(setq PD (distance BP_SB BP_NB))
		(setq DIS_lst (cons PD DIS_lst))
	)
(setq LDP (vl-position (apply 'min DIS_lst) DIS_lst))
(setq NP (nth LDP NB_lst))
(command "_.pline" BP_SB NP "")
(princ)
)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Your 1st requirement (after looking the attached Image) I did not get your point.........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;What do you mean by "&lt;SPAN&gt;certain angles&lt;/SPAN&gt;" the "PLINE" angle .... connecting the base points of two Block.......?&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &lt;SPAN&gt;What do you mean by&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;"90 grades" ........ difference of Y co-ordinate of two base points.......?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3&amp;nbsp; What about 180 degree in&amp;nbsp;attached Image....?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;___________________&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for reply your code works great as always.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;about the first request. I need to link to nearest blocks but ignoring (marked with red) blocks that are between 180 to 360 grades of the base point (should ignore their base point), no matter their rotation. (like the image)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/569738i7E19E33B542C69C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 01:16:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8402994#M96722</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-15T01:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8407765#M96723</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5869979"&gt;@dbhunia&lt;/a&gt;&lt;BR /&gt;I was testing your code but I can't make it work&lt;BR /&gt;...I just received this :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;"BBL3&lt;/P&gt;&lt;P&gt;Select a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)&lt;BR /&gt;Select Nearest Objects by [Block Name/Layer Name]: L&lt;BR /&gt;LAYER&lt;BR /&gt;Select a Object for Layer which contain Nearby Block upto which you want to draw line....l-1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;AutoCAD menu utilities loaded.*Cancel*

Command:

Autodesk DWG.  This file is a TrustedDWG last saved by an Autodesk application or Autodesk licensed application.

Command:

Command:
Command:
Command:
Command: _pasteclip
Specify insertion point: *Cancel*

Command: *Cancel*

Command:
Command:
Command: _pasteclip
Command: (LOAD "C:/Users/JUAN-MINIPC/Google Drive/AUTOCAD-LISP-VBA-FAS/BLOCKs/LINK TO NEAREST BLOCK/SELECT BLOCK - LINK TO NAME OR LAYER/BBL3.LSP") C:BBL3

Command: BBL3

Select a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)
Select Nearest Objects by [Block Name/Layer Name]: B
BLOCK
Select a Nearby Block upto which you want to draw line....; error: bad argument type: lentityp nil

Command:
Command:
BBL3

Select a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)
Select Nearest Objects by [Block Name/Layer Name]: L
LAYER
Select a Object for Layer which contain Nearby Block upto which you want to draw line....l-1


*Invalid selection*
Expects a point or Last

Select a Object for Layer which contain Nearby Block upto which you want to draw line....l-1


*Invalid selection*
Expects a point or Last

Select a Object for Layer which contain Nearby Block upto which you want to draw line....; error: bad argument type: lselsetp nil

Command:
Command:
Command: *Cancel*&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;... Am I doing something bad?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Nov 2018 01:19:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8407765#M96723</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-17T01:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8407769#M96724</link>
      <description>&lt;P&gt;I attached my test file.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;this lisp does not worh&amp;nbsp;with red block in my drawing file.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Nov 2018 01:29:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8407769#M96724</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-17T01:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8407892#M96725</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi what I get from your post.......(if you are using my code (not modified), otherwise post the code)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5869979"&gt;@dbhunia&lt;/a&gt;&lt;BR /&gt;I was testing your code but I can't make it work&lt;BR /&gt;...I just received this :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;"BBL3&lt;/P&gt;&lt;P&gt;Select a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)&lt;BR /&gt;Select Nearest Objects by [Block Name/Layer Name]: L&lt;BR /&gt;LAYER&lt;BR /&gt;Select a Object for Layer which contain Nearby Block upto which you want to draw line....&lt;FONT color="#FF0000"&gt;l-1"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;AutoCAD menu utilities loaded.*Cancel*

Command:

Autodesk DWG.  This file is a TrustedDWG last saved by an Autodesk application or Autodesk licensed application.

Command:

Command:
Command:
Command:
Command: _pasteclip
Specify insertion point: *Cancel*

Command: *Cancel*

Command:
Command:
Command: _pasteclip
Command: (LOAD "C:/Users/JUAN-MINIPC/Google Drive/AUTOCAD-LISP-VBA-FAS/BLOCKs/LINK TO NEAREST BLOCK/SELECT BLOCK - LINK TO NAME OR LAYER/BBL3.LSP") C:BBL3

Command: BBL3

Select a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)
Select Nearest Objects by [Block Name/Layer Name]: B
BLOCK
Select a Nearby Block upto which you want to draw line....&lt;FONT color="#FF0000"&gt;;&lt;/FONT&gt; error: bad argument type: lentityp nil

Command:
Command:
BBL3

Select a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)
Select Nearest Objects by [Block Name/Layer Name]: L
LAYER
Select a Object for Layer which contain Nearby Block upto which you want to draw line....&lt;FONT color="#FF0000"&gt;l-1&lt;/FONT&gt;


*Invalid selection*
Expects a point or Last

Select a Object for Layer which contain Nearby Block upto which you want to draw line....&lt;FONT color="#FF0000"&gt;l-1&lt;/FONT&gt;


*Invalid selection*
Expects a point or Last

Select a Object for Layer which contain Nearby Block upto which you want to draw line....&lt;FONT color="#FF0000"&gt;;&lt;/FONT&gt; error: bad argument type: lselsetp nil

Command:
Command:
Command: *Cancel*&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;... Am I doing something bad?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whenever code ask you......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;STRONG&gt;Select a Nearby Block upto which you want to draw line....&lt;/STRONG&gt;"&amp;nbsp;Or "&lt;STRONG&gt;Select a Object for Layer which contain Nearby Block upto which you want to draw line....&lt;/STRONG&gt;" You have to either &lt;SPAN&gt;PICK&amp;nbsp;&lt;/SPAN&gt;a BLOCK or PICK any object from the LAYER using MOUSE no KEYBOARD entry (Red Marked).....&lt;/P&gt;</description>
      <pubDate>Sat, 17 Nov 2018 06:09:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8407892#M96725</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-11-17T06:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8408404#M96726</link>
      <description>&lt;P&gt;yes. I did that.&lt;BR /&gt;&lt;BR /&gt;I was testing with more block and apparently, this lisp does not work with Dynamic Blocks.&lt;BR /&gt;&lt;BR /&gt;This problem is related to all LISP that I was using. I found a lot of problems in google about Dynamic Blocks.&lt;BR /&gt;&lt;BR /&gt;If you can fix this I will be&amp;nbsp;grateful for ever.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5869979"&gt;@dbhunia&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi what I get from your post.......(if you are using my code (not modified), otherwise post the code)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5869979"&gt;@dbhunia&lt;/a&gt;&lt;BR /&gt;I was testing your code but I can't make it work&lt;BR /&gt;...I just received this :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;"BBL3&lt;/P&gt;&lt;P&gt;Select a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)&lt;BR /&gt;Select Nearest Objects by [Block Name/Layer Name]: L&lt;BR /&gt;LAYER&lt;BR /&gt;Select a Object for Layer which contain Nearby Block upto which you want to draw line....&lt;FONT color="#FF0000"&gt;l-1"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;AutoCAD menu utilities loaded.*Cancel*

Command:

Autodesk DWG.  This file is a TrustedDWG last saved by an Autodesk application or Autodesk licensed application.

Command:

Command:
Command:
Command:
Command: _pasteclip
Specify insertion point: *Cancel*

Command: *Cancel*

Command:
Command:
Command: _pasteclip
Command: (LOAD "C:/Users/JUAN-MINIPC/Google Drive/AUTOCAD-LISP-VBA-FAS/BLOCKs/LINK TO NEAREST BLOCK/SELECT BLOCK - LINK TO NAME OR LAYER/BBL3.LSP") C:BBL3

Command: BBL3

Select a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)
Select Nearest Objects by [Block Name/Layer Name]: B
BLOCK
Select a Nearby Block upto which you want to draw line....&lt;FONT color="#FF0000"&gt;;&lt;/FONT&gt; error: bad argument type: lentityp nil

Command:
Command:
BBL3

Select a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)
Select Nearest Objects by [Block Name/Layer Name]: L
LAYER
Select a Object for Layer which contain Nearby Block upto which you want to draw line....&lt;FONT color="#FF0000"&gt;l-1&lt;/FONT&gt;


*Invalid selection*
Expects a point or Last

Select a Object for Layer which contain Nearby Block upto which you want to draw line....&lt;FONT color="#FF0000"&gt;l-1&lt;/FONT&gt;


*Invalid selection*
Expects a point or Last

Select a Object for Layer which contain Nearby Block upto which you want to draw line....&lt;FONT color="#FF0000"&gt;;&lt;/FONT&gt; error: bad argument type: lselsetp nil

Command:
Command:
Command: *Cancel*&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;... Am I doing something bad?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whenever code ask you......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;STRONG&gt;Select a Nearby Block upto which you want to draw line....&lt;/STRONG&gt;"&amp;nbsp;Or "&lt;STRONG&gt;Select a Object for Layer which contain Nearby Block upto which you want to draw line....&lt;/STRONG&gt;" You have to either &lt;SPAN&gt;PICK&amp;nbsp;&lt;/SPAN&gt;a BLOCK or PICK any object from the LAYER using MOUSE no KEYBOARD entry (Red Marked).....&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Nov 2018 19:05:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8408404#M96726</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-17T19:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8408477#M96727</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun C:BBL (/);;Put Temp Variables here.....
(vl-load-com)
(setq SB_lst nil)
(setq NB_lst nil)
(Setq SB_Name (cdr (assoc 2 (setq Data (entget(car(entsel "\nSelect a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)")))))))
(if (= (wcmatch SB_Name "*U*") T)
	(Setq SB_Name (vla-get-Effectivename (vlax-ename-&amp;gt;vla-object (cdr (assoc -1 Data)))))
)
(Setq selectionset_SB (BLOCKSSET SB_Name))
(initget 1 "Block Layer")
(setq NBO (getkword "\nSelect Nearest Objects by [Block Name/Layer Name]: "))
(if (= NBO "Block")
	(progn
		(princ "BLOCK")
		(Setq NSB (cdr (assoc 2 (setq Data1 (entget(car(entsel "\nSelect a Nearby Block upto which you want to draw line....")))))))
		(if (= (wcmatch NSB "*U*") T)
			(Setq NSB (vla-get-Effectivename (vlax-ename-&amp;gt;vla-object (cdr (assoc -1 Data1)))))
		)
		(Setq selectionset_NB (BLOCKSSET NSB))

		;(Setq selectionset_NB (ssget "_A" (list '(0 . "INSERT") (cons 2 NSB))))
	)
	(progn
		(princ "LAYER")
		(Setq NSBL (cdr (assoc 8 (entget(car(entsel "\nSelect a Object for Layer which contain Nearby Block upto which you want to draw line...."))))))
		(Setq selectionset_NB (ssget "_A" (list '(0 . "INSERT") (cons 8 NSBL))))
	)
)
(repeat (setq N (sslength selectionset_SB))
	(setq BP_Block (cdr (assoc 10 (entget (ssname selectionset_SB (setq N (- N 1)))))))
	(setq SB_lst (cons BP_Block SB_lst))
)
(repeat (setq N (sslength selectionset_NB))
	(setq BP_Block (cdr (assoc 10 (entget (ssname selectionset_NB (setq N (- N 1)))))))
	(setq NB_lst (cons BP_Block NB_lst))
)
(repeat (setq N (length SB_lst))
	(setq BP_SB (nth (setq N (- N 1)) SB_lst))
	(setq DIS_lst nil)
	(repeat (setq N1 (length NB_lst))
		(setq BP_NB (nth (setq N1 (- N1 1)) NB_lst))
	    	(setq PD (distance BP_SB BP_NB))
		(setq DIS_lst (cons PD DIS_lst))
	)
(setq LDP (vl-position (apply 'min DIS_lst) DIS_lst))
(setq NP (nth LDP NB_lst))
(command "_.pline" BP_SB NP "")
(princ)
)
)
(defun BlockSSET (blname / sset ss-dyn num ent effname)
   (vl-load-com) 
   (if (not (setq sset (ssget "X" (list (cons 2 blname)))))
      (setq sset (ssadd))
 )
 (if (setq ss-dyn (ssget "X" (list (cons 2 "`*U*"))))
      (progn
            (setq num 0)
           (repeat (sslength ss-dyn)
             (setq ent (ssname ss-dyn num))
             (setq effname (vla-get-EffectiveName (vlax-ename-&amp;gt;vla-object ent)))
              (if (= blname effname)
                  (ssadd ent sset)
              )
         (setq num (1+ num))
            )
     )
 )
sset
)&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 Nov 2018 20:52:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8408477#M96727</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-11-17T20:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8408633#M96728</link>
      <description>&lt;P&gt;Thanks for fix code.&lt;BR /&gt;&lt;BR /&gt;Its possible add a limiting option to allow code work just in a certain range of angles?&lt;BR /&gt;&lt;BR /&gt;I want&amp;nbsp;to use this code to link just with blocks that&amp;nbsp;are between an angle range of&amp;nbsp;30&amp;nbsp;&lt;SPAN&gt;grades&amp;nbsp;&lt;/SPAN&gt;and 150&amp;nbsp;&lt;SPAN&gt;grades&lt;/SPAN&gt; ( 120 grades like range vision for example) respect&amp;nbsp;to block rotation.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 00:33:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8408633#M96728</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-18T00:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8408795#M96729</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The last code may be solved your problem........ But it will fail for the below reasons.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your selected block (non dynamic block) is named like "&lt;STRONG&gt;xxxxxUxxxx&lt;/STRONG&gt;" or block name containing "&lt;STRONG&gt;U&lt;/STRONG&gt;" .........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the below RED marked line become "&lt;STRONG&gt;T&lt;/STRONG&gt;"......&lt;/P&gt;&lt;P&gt;For that reason code will go for BLUE marked line (to get the name of dynamic block)..... and the code will fail .....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun C:BBL (/);;Put Temp Variables here.....
....................
(Setq SB_Name (cdr (assoc 2 (setq Data (entget(car(entsel "\nSelect a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)")))))))
(if &lt;FONT color="#FF0000"&gt;(= (wcmatch SB_Name "*U*") T)&lt;/FONT&gt;
	&lt;FONT color="#0000FF"&gt;(Setq SB_Name (vla-get-Effectivename (vlax-ename-&amp;gt;vla-object (cdr (assoc -1 Data)))))&lt;/FONT&gt;
)
(Setq selectionset_SB (BLOCKSSET SB_Name))
(initget 1 "Block Layer")
(setq NBO (getkword "\nSelect Nearest Objects by [Block Name/Layer Name]: "))
(if (= NBO "Block")
	(progn
		(princ "BLOCK")
		(Setq NSB (cdr (assoc 2 (setq Data1 (entget(car(entsel "\nSelect a Nearby Block upto which you want to draw line....")))))))
		(if &lt;FONT color="#FF0000"&gt;(= (wcmatch NSB "*U*") T)&lt;/FONT&gt;
			&lt;FONT color="#0000FF"&gt;(Setq NSB (vla-get-Effectivename (vlax-ename-&amp;gt;vla-object (cdr (assoc -1 Data1)))))&lt;/FONT&gt;
		)
		(Setq selectionset_NB (BLOCKSSET NSB))&lt;BR /&gt;....................&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it is my suggestion to use the corrected code below......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun C:BBL (/);;Put Temp Variables here.....
(vl-load-com)
(setq SB_lst nil)
(setq NB_lst nil)
(Setq SB_Name (cdr (assoc 2 (setq Data (entget (setq PBP (car(entsel "\nSelect a block(For Block Name) from which you want to draw line to Nearby Block (Other than Selected block)"))))))))
(if &lt;FONT color="#0000FF"&gt;(= :vlax-true (vla-get-IsDynamicBlock (vlax-ename-&amp;gt;vla-object PBP)))&lt;/FONT&gt;
	(Setq SB_Name (vla-get-Effectivename (vlax-ename-&amp;gt;vla-object (cdr (assoc -1 Data)))))
)
(Setq selectionset_SB (BLOCKSSET SB_Name))
(initget 1 "Block Layer")
(setq NBO (getkword "\nSelect Nearest Objects by [Block Name/Layer Name]: "))
(if (= NBO "Block")
	(progn
		(princ "BLOCK")
		(Setq NSB (cdr (assoc 2 (setq Data1 (entget (setq PBP1 (car(entsel "\nSelect a Nearby Block upto which you want to draw line...."))))))))
		(if &lt;FONT color="#0000FF"&gt;(= :vlax-true (vla-get-IsDynamicBlock (vlax-ename-&amp;gt;vla-object PBP1)))&lt;/FONT&gt;
			(Setq NSB (vla-get-Effectivename (vlax-ename-&amp;gt;vla-object (cdr (assoc -1 Data1)))))
		)
		(Setq selectionset_NB (BLOCKSSET NSB))
	)
	(progn
		(princ "LAYER")
		(Setq NSBL (cdr (assoc 8 (entget(car(entsel "\nSelect a Object for Layer which contain Nearby Block upto which you want to draw line...."))))))
		(Setq selectionset_NB (ssget "_A" (list '(0 . "INSERT") (cons 8 NSBL))))
	)
)
(repeat (setq N (sslength selectionset_SB))
	(setq BP_Block (cdr (assoc 10 (entget (ssname selectionset_SB (setq N (- N 1)))))))
	(setq SB_lst (cons BP_Block SB_lst))
)
(repeat (setq N (sslength selectionset_NB))
	(setq BP_Block (cdr (assoc 10 (entget (ssname selectionset_NB (setq N (- N 1)))))))
	(setq NB_lst (cons BP_Block NB_lst))
)
(repeat (setq N (length SB_lst))
	(setq BP_SB (nth (setq N (- N 1)) SB_lst))
	(setq DIS_lst nil)
	(repeat (setq N1 (length NB_lst))
		(setq BP_NB (nth (setq N1 (- N1 1)) NB_lst))
	    	(setq PD (distance BP_SB BP_NB))
		(setq DIS_lst (cons PD DIS_lst))
	)
(setq LDP (vl-position (apply 'min DIS_lst) DIS_lst))
(setq NP (nth LDP NB_lst))
(command "_.pline" BP_SB NP "")
(princ)
)
)
(defun BlockSSET (blname / sset ss-dyn num ent effname)
(vl-load-com) 
  (if (not (setq sset (ssget "X" (list (cons 2 blname)))))
      (setq sset (ssadd))
  )
  (if (setq ss-dyn (ssget "X" (list (cons 2 "`*U*"))))
      (progn
           (setq num 0)
           (repeat (sslength ss-dyn)
             (setq ent (ssname ss-dyn num))
             (setq effname (vla-get-EffectiveName (vlax-ename-&amp;gt;vla-object ent)))
              (if (= blname effname)
                  (ssadd ent sset)
              )
             (setq num (1+ num))
           )
      )
  )
sset
)&lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Nov 2018 09:00:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8408795#M96729</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-11-18T09:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409208#M96730</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks for fix code again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But returning to the original post,&amp;nbsp;its possible add limiting options to allow code work just in a certain range of angles or ignore block between certain angles choice for the user?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want&amp;nbsp;to use this code to link just with blocks that&amp;nbsp;are between an angle range of&amp;nbsp;0&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;grades (variable)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;and 180&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;grades ( variable)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;respect&amp;nbsp;to block base point and their rotation, I need to ignore all block between 180 grades and 360 grades respect&amp;nbsp;to block base point and their rotation.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 19:37:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409208#M96730</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-18T19:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409222#M96731</link>
      <description>&lt;P&gt;Define 0 degrees, is it Autocad (East) along the x axis and anticlockwise&amp;nbsp; or Survey (North) along the y axis and clockwise?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 19:57:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409222#M96731</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2018-11-18T19:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409350#M96732</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5644077"&gt;@dlanorh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Define 0 degrees, is it Autocad (East) along the x axis and anticlockwise&amp;nbsp; or Survey (North) along the y axis and clockwise?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;the concept is the same but instead axis I need to use block base point and should be considered&amp;nbsp;in each block from where is create the polyline and angle should be an anticlockwise rotation.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 23:03:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409350#M96732</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-18T23:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409352#M96733</link>
      <description>&lt;P&gt;something like this image (block marked with an "X" is ignored because are between 180 grades and 360 grades respect&amp;nbsp;to basepoint angle 0)&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/570805i797B9ECE26E88AC3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 23:08:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409352#M96733</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-18T23:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409359#M96734</link>
      <description>&lt;HR /&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;wrote:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/569738i7E19E33B542C69C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Is the 0-180 degrees relative to the rotation angle of the block you are drawing the line from? See attached drawing.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 23:13:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409359#M96734</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2018-11-18T23:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409814#M96735</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for fix code again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;But returning to the original post,&amp;nbsp;its possible add limiting options to allow code work just in a certain range of angles or ignore block between certain angles choice for the user?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want&amp;nbsp;to use this code to link just with blocks that&amp;nbsp;are between an angle range of&amp;nbsp;0&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;grades (variable)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;and 180&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;grades ( variable)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;respect&amp;nbsp;to block base point and their rotation, I need to ignore all block between 180 grades and 360 grades respect&amp;nbsp;to block base point and their rotation.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this..........(It's lightly tested)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 07:39:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409814#M96735</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-11-19T07:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409816#M96736</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5644077"&gt;@dlanorh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;HR /&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;wrote:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/569738i7E19E33B542C69C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Is the 0-180 degrees relative to the rotation angle of the block you are drawing the line from? See attached drawing.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes. In each block angle is relative&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 07:42:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409816#M96736</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-19T07:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409877#M96737</link>
      <description>&lt;P&gt;OK. Try the attached. It's not tested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 08:25:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8409877#M96737</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2018-11-19T08:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8410518#M96738</link>
      <description>&lt;P&gt;I managed to test and it didn't work for all "FROM" block rotations. I have amended and (minimally) tested, and the attached should now work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 13:51:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8410518#M96738</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2018-11-19T13:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lisp to work only at certain angles and others...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8411437#M96739</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5644077"&gt;@dlanorh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;HR /&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;wrote:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/569738i7E19E33B542C69C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Is the 0-180 degrees relative to the rotation angle of the block you are drawing the line from? See attached drawing.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;yes. your drawing attached explain better what I need.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/571206iB5FD7730213AEBEE/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 19:13:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-work-only-at-certain-angles-and-others/m-p/8411437#M96739</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-19T19:13:28Z</dc:date>
    </item>
  </channel>
</rss>

