Rooster Posted December 12, 2011 Posted December 12, 2011 I've been wanting to get hold of a LISP for replacing certain occurences of a block (but not the block globally, as the BLOCKREPLACE function would do). I downloaded this VLX file from http://www.cadstudio.cz/en/download.asp?file=RIblock as it is perfect for what I wanted..... except that when it replaces the selected blocks it doesn't retain the original block's attributes (eg. scale), which is essential. Can anyone make any suggestions to help? Many thanks. Quote
Tharwat Posted December 12, 2011 Posted December 12, 2011 Can you please explain what does that lisp from cadstudio do ? or if you explain your needs of a lisp routine separately would be highly appreciated . Quote
Rooster Posted December 12, 2011 Author Posted December 12, 2011 Hi Tharwat. "The RIblock command prompts for the name of the replaced block (or for picking its sample), then you select the references of this block (to be replaced) and then you specify (by picking or by name) the new block. This new block will replace the selected references of the original block. Possible attributes with the same name (tag) will be automatically transferred from the replaced blocks." I had thought that the last sentence implied that attributes such as scale and rotation would be maintained with the new block, but not so..... Quote
Tharwat Posted December 12, 2011 Posted December 12, 2011 That looks interesting to code . Would be back soon . Quote
Rooster Posted December 12, 2011 Author Posted December 12, 2011 Ah... I've worked out my problem. There is nothing wrong with the RIBLOCK.VLX file - the reason my new block was not scaling as per the block it was replacing was because I had the option ticked to scale uniformly when I created my replacement block. Taking that out has solved my issue. Happy days Quote
Tharwat Posted December 12, 2011 Posted December 12, 2011 It's OK . I happy to hear that , so good luck . Quote
Anderson51 Posted March 28, 2017 Posted March 28, 2017 Does the .vlx file load the same way as a typical lisp routine would? Thanks, Anderson Quote
Tharwat Posted March 28, 2017 Posted March 28, 2017 Does the .vlx file load the same way as a typical lisp routine would? Thanks, Anderson Welcome to CADTutor Anderson. The answer to your question is yes. Have a look at my signature below and there is a link says: How to load an AutoLISP program, so just hit the link and read the article. Quote
Anderson51 Posted March 28, 2017 Posted March 28, 2017 I have it loaded, now I am struggling with the functionality of the command. Quote
tombu Posted March 29, 2017 Posted March 29, 2017 I will not run compiled code, just requires putting too much trust in someone I don't know. Lots of similar lisp out there for doing this: http://www.cadtutor.net/forum/showthread.php?48458-Replace-Selected-Block-Or-Blocks-With-Another-Block&p=359585&viewfull=1#post359585 http://www.cadtutor.net/forum/showthread.php?56790-Replace-only-selected-blocks-with-a-different-one&p=384682&posted=1#post384682 https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-group-of-blocks-that-are-selected/m-p/4333482#M313227 https://www.theswamp.org/index.php?topic=8823.msg113941#msg113941 Quote
Recommended Posts
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.