Jump to content

battman sync


pmxcad

Recommended Posts

Hello,

 

Question:

I`ve about 25 drawings in witch have to update a block. That block has a new attribute. Normaly i have to open the drawing, insert the the modified block, run battman and hit the sync button.

 

Is there a lisp for this to do it in one time for all selected drawings? Like selecting the drawings, select the block file, and after that run battman, sync. and so update al the selected drawings.

 

Thanks

Link to comment
Share on other sites

Try this buddy .:)

 

(defun c:Test (/ ss)
 ;; Tharwat 31. 07. 2011
 (if (setq ss (ssget "_x" '((0 . "INSERT") (66 . 1))))
   (command "_.attsync" "_select" ss "" "_Yes")
 )
 (princ)
)

 

Tharwat

Link to comment
Share on other sites

Try this buddy .:)

 

(defun c:Test (/ ss)
 ;; Tharwat 31. 07. 2011
 (if (setq ss (ssget "_x" '((0 . "INSERT") (66 . 1))))
   (command "_.attsync" "_select" ss "" "_Yes")
 )
 (princ)
)

Tharwat

 

 

 

OK Tarwat...................

How does it work?

 

I want to select multiple drawings and a choose a external block file with that new attribute and applay battman/sync to al selected drawings.

 

Tanks

Link to comment
Share on other sites

Copy codes to your command line and type test to update all att blocks in the current drawing , but it does not work for selected drawings (because that is a very big

routine and out of my capabilities) :)

 

So some better than nothing .

 

BTW it is Tharwat not Tarwat .

 

Enjoy it .

Link to comment
Share on other sites

Sorry Tharwat,

 

Is it possible to convert this lisp to script (scr)?

I got Autcad electrical and i can run a project wide script.

I can run the script for al the drawings in a project.So it would be very nice if it is possible to convert the lisp to a script.

 

Thanks............

Link to comment
Share on other sites

No worries Buddy .

 

It's been for a long time now that I have not used scripts but I think the following one is correct and please try it and tell me back .

 

Codes must be as they are in three lines .

 

attsync
select
(setq ss (ssget "_x" '((0 . "INSERT") (66 . 1))))

Link to comment
Share on other sites

Actually if you know the block's name you don't even need the lisp ... just run it directly in a SCR file through ScriptPro / AutoScript / EZScript / Lee's ScriptWriter / BatchLisp / etc. Your script would be something like this:

AttSync Name MyBlockName
QSAVE

 

What I'd really like though is to have BAttMan/AttSync only work on selected blocks ... note what they do when the block is mirrored!

Link to comment
Share on other sites

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