<?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: AttSync not working in a script file in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/10380125#M120524</link>
    <description>&lt;P&gt;Had to make one small change. Was still unstable. Ultimately it is a work around. I cant figure out why this is failing and causing script to pause.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Got around it by using: (command resume)&lt;/P&gt;&lt;P&gt;I confirmed that it was the attsync causing the script to fail. Never found a way to debug the script execution to see what errors were being thrown to cause the issue.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jun 2021 16:49:55 GMT</pubDate>
    <dc:creator>bgumPXZJF</dc:creator>
    <dc:date>2021-06-10T16:49:55Z</dc:date>
    <item>
      <title>AttSync not working in a script file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7059835#M120516</link>
      <description>&lt;P&gt;I'm at the point in a script where I want to sync the block named temptitle then purge the block named&amp;nbsp; 4title.&amp;nbsp; The script snipit looks like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ATTSYNC Name "temptitle" -Purge B "4title" N&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the script runs up to that point, it tries to use everything after the Name option as the block name:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Command: ATTSYNC&lt;BR /&gt;Enter an option [?/Name/Select] &amp;lt;Select&amp;gt;: Name&lt;BR /&gt;Enter name of block to sync or [?]: "temptitle" -Purge B "4title" N -Rename B "temptitle" "4title" Qsave Close&lt;BR /&gt;Block table contains no attributed block named "temptitle" -Purge B "4title" N -Rename B "temptitle" "4title" Qsave Close&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried it with and without the "" around the name and with an extra space after the block name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestion on how to make the script read the name properly?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jon&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 21:46:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7059835#M120516</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-03T21:46:01Z</dc:date>
    </item>
    <item>
      <title>Betreff: AttSync not working in a script file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7059865#M120517</link>
      <description>Your little mistake. You must confirm the block name with an ENTER, which is a line break.&lt;BR /&gt;In the script, insert a line break immediately after the last character of the block name.&lt;BR /&gt;&lt;BR /&gt;Space is not equal to enter!&lt;BR /&gt;Autocad interprets a space as Enter only in situations where no space is allowed.&lt;BR /&gt;Try it by hand in the command line. -Attsync space / works because there can be no command-name with spaces.&lt;BR /&gt;&lt;BR /&gt;Name spaces as well.&lt;BR /&gt;&lt;BR /&gt;Then type the block name and leave spaces and other input, blanks are allowed in block names (unfortunately).&lt;BR /&gt;&lt;BR /&gt;Hope it helps.&lt;BR /&gt;</description>
      <pubDate>Wed, 03 May 2017 22:00:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7059865#M120517</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2017-05-03T22:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: AttSync not working in a script file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7059868#M120518</link>
      <description>&lt;P&gt;Does adding on separate lines help. Like this&lt;/P&gt;
&lt;P&gt;ATTSYNC&lt;BR /&gt;Name&lt;BR /&gt;temptitle&lt;BR /&gt;-Purge&lt;BR /&gt;B&lt;BR /&gt;4title&lt;BR /&gt;N etc. etc.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 22:01:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7059868#M120518</guid>
      <dc:creator>Ranjit_Singh</dc:creator>
      <dc:date>2017-05-03T22:01:19Z</dc:date>
    </item>
    <item>
      <title>Betreff: AttSync not working in a script file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7061127#M120519</link>
      <description>&lt;P&gt;Hi Betreff,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Spaces as returns work elsewhere in the script such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -blockreplace "4title" "temptitle" N Erase L&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Those all work fine with spaces as Enters but not here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; ATTSYNC Name "temptitle" -Purge B&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried using a "" as an Enter but that didn't help.&lt;/P&gt;
&lt;P&gt;I don't know what you mean by "&lt;BR /&gt;"Name spaces as well"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any other suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 11:52:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7061127#M120519</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-04T11:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: AttSync not working in a script file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7061134#M120520</link>
      <description>&lt;P&gt;Thanks Ranjit,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This script applies to about 400 files an would be a bit unwieldy with that many extra line breaks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any other suggestions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 11:56:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7061134#M120520</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-04T11:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: AttSync not working in a script file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7061230#M120521</link>
      <description>&lt;P&gt;&lt;EM&gt;"Space is not equal to enter!&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;Autocad interprets a space as Enter only in situations where no space is allowed.&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Try it by hand in the command line. -Attsync space / works because there can be no command-name with spaces."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This works for me (, but should not! &lt;SPAN class=""&gt;I do not know why autoCAD accepts a space t&lt;/SPAN&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;o confirm the blockname in the Purge-command /-in Scripts)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;_.ATTSYNC _name temptitle&lt;BR /&gt;_.-PURGE _block 4title _no&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;SPAN class=""&gt;Normally, the block name should also be confirmed with a line break in the Clean Up dialog.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;SPAN class=""&gt;_.ATTSYNC _name temptitle&lt;BR /&gt;_.-PURGE _block 4title&lt;BR /&gt;_no&lt;BR /&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 12:32:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7061230#M120521</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2017-05-04T12:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: AttSync not working in a script file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7061464#M120522</link>
      <description>&lt;P&gt;It's solved.&amp;nbsp; I had to enter the text as a LISP command:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Erase L&amp;nbsp; (command "ATTSYNC" "Name" "temptitle") -Purge B&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for everyone's input.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 13:30:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/7061464#M120522</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-04T13:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: AttSync not working in a script file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/10379463#M120523</link>
      <description>&lt;P&gt;I was having issue with my lisp not finishing when I used my script generator.&lt;/P&gt;&lt;P&gt;Below is the lisp code that I got to work when used in script generator. It was odd cause I had no issues in a single drawing when ran as just lisp&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below that are 2 lines that are generated from my script generator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has to do with the line return as mentioned about by CADffm, i solved this by just adding a blank "(command)" after attsync. Hope this helps.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;;===========================================================
; 9/Jun/2021 10:24 AM[Wednesday]	AUTHOR: Brandon Gum
;--
;----WORKING---
;DESCRIPTION: Replace a block definition over a list of drawings. Designed to be used with ScriptPro. 
;We will use the CoreConsole within Script Pro.
;--
;The insert portion needs a = after the block name to let it know that you are trying to redeclare from external source.
;--
;Had issues with this in script format with it not continuing on. 
;SOLVED! ---&amp;gt; Attysnc was cause. See details below. Logged in onenote.
;--
;Thought it has to do with attsync and or active viewport.
;Ended up being because of attsync. 
;Saw a post online that said you needed a line-return after specifing the block name to confirm it. Just added a "(command)" afterwards.
;------------
;HELPFUL LINK =;https://www.cad-notes.com/how-to-update-autocad-block-in-multiple-files-using-script/
;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/best-practice-modifying-block-definitions/td-p/8902280
;===========================================================
;-INSERT
;"O:\Veolia Technical Solutions\13004.330 Gum Springs\Dwgs\_Plant 3D\Constructs\Veolia E-size PID Border Text"
(defun C:BlockRedefine ( / )
	(command "attreq" "0") ;added as precaution
	(if (= (getvar 'tilemode) 0) ;if already in paperspace
		(progn
			(command "._PSPACE") ;disable active viewport as a precaution
		);_end of progn
	);_end of if 		
	(if (tblsearch "block" "Veolia E-size P3D Border Text")
		(progn
			(command "-rename" "b" "Veolia E-size P3D Border Text" "Veolia E-size PID Border Text")
			(command "insert" "Veolia E-size PID Border Text=O:\\Veolia Technical Solutions\\13004.330 Gum Springs\\Dwgs\\_Plant 3D\\Constructs\\Veolia E-size PID Border Text" nil)
			(command "_.attsync" "n" "Veolia E-size PID Border Text")
			(command) ;needed to get the lisp to work when ran with bg_scr_generator. It would stop and not save then close. However it would continue to work if I typed resume.
			(while (= 1 (getvar 'cmdactive)) ;wait for cmd to finish as a precaution. Was having issues with script not continuing.
				(command pause) ;added as precaution
			) ;end of while
		) ;_end of progn
	) ;_end of if
	(command "attreq" "1") ;added as precaution
	(princ) ;quiet close
) ;end of function &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;_.open "O:\Veolia Technical Solutions\13004.330 Gum Springs\Dwgs\_Plant 3D\Dwgs_Gum Springs\PID DWG\VGS-PRO-0100-PID-8770.dwg" (setvar "filedia" 0) (load "blockredefine" nil) (C:blockredefine) _.qsave
_.close
_.open "O:\Veolia Technical Solutions\13004.330 Gum Springs\Dwgs\_Plant 3D\Dwgs_Gum Springs\PID DWG\VGS-PRO-0100-PID-8771.dwg" (setvar "filedia" 0) (load "blockredefine" nil) (C:blockredefine) _.qsave
_.close&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 10 Jun 2021 13:07:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/10379463#M120523</guid>
      <dc:creator>bgumPXZJF</dc:creator>
      <dc:date>2021-06-10T13:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: AttSync not working in a script file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/10380125#M120524</link>
      <description>&lt;P&gt;Had to make one small change. Was still unstable. Ultimately it is a work around. I cant figure out why this is failing and causing script to pause.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Got around it by using: (command resume)&lt;/P&gt;&lt;P&gt;I confirmed that it was the attsync causing the script to fail. Never found a way to debug the script execution to see what errors were being thrown to cause the issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 16:49:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-not-working-in-a-script-file/m-p/10380125#M120524</guid>
      <dc:creator>bgumPXZJF</dc:creator>
      <dc:date>2021-06-10T16:49:55Z</dc:date>
    </item>
  </channel>
</rss>

