harimaddddy Posted 19 hours ago Posted 19 hours ago Hi all, I'm try to build a lisp program to link content of a text and attributes/text. Somehow I manage to place the values in side the attribute with example code references. When comes to introduce a reactor to maintain the sync between the contents I can't. Thus, this text sync can be done with Field but If someone delete the source then its mess. So I came up with this idea. text has the format like SEC_NO,TAG_NO,FLAG_NO. Those would link with same tag named attribute and the copy of blocks as well. Once master text value change the respective values in attribute would change (See snap). if it turns hard, text to text would save tons of time and can use with multiple times. Thanks in advance. trail.lsp TextSync.dwg Quote
BIGAL Posted 2 hours ago Posted 2 hours ago There is vlr-object-reactor, which can call a defun like your lisp. i dont know how though you would pass it the correct block object to change. If you make the text a block then you could have a invisible attribute which is the handle ID of the matching block. https://www.google.com/search?q=reactor+object+cahnged+autocad+lisp&sca_esv=3b7e4dc23e2c7901&source=hp&ei=KKWOaOmOLsaU4-EPgIS0-Qk&iflsig=AOw8s4IAAAAAaI6zOGqTE_bufe0aJLcdS0xRbMY74k-X&ved=0ahUKEwjpwoS9qe2OAxVGyjgGHQACLZ8Q4dUDCA8&uact=5&oq=reactor+object+cahnged+autocad+lisp&gs_lp=Egdnd3Mtd2l6IiNyZWFjdG9yIG9iamVjdCBjYWhuZ2VkIGF1dG9jYWQgbGlzcDIHECEYoAEYCjIFECEYnwVI4lFQgwpY-ExwAXgAkAEAmAGWAqAB1TWqAQcwLjE4LjE3uAEDyAEA-AEBmAIkoALFNqgCCsICChAAGAMY6gIYjwHCAgsQABiABBixAxiDAcICCxAuGIAEGLEDGIMBwgIREC4YgAQYsQMY0QMYgwEYxwHCAg4QLhiABBixAxiDARiKBcICDhAAGIAEGLEDGIMBGIoFwgIIEAAYgAQYsQPCAg4QLhiABBixAxjRAxjHAcICCxAuGIAEGNEDGMcBwgIOEAAYgAQYsQMYgwEYyQPCAg4QABiABBixAxiSAxiDAcICCxAAGIAEGJIDGIoFwgIUEC4YgAQYsQMYgwEYxwEYjgUYrwHCAggQLhiABBixA8ICDhAuGIAEGMcBGI4FGK8BwgIFEAAYgATCAgUQLhiABMICBhAAGBYYHsICCBAAGBYYChgewgILEAAYgAQYhgMYigXCAgUQABjvBcICCBAAGIAEGKIEwgIIEAAYogQYiQXCAgUQIRigAcICBhAhGBUYCpgDBvEFDVTDEYK0XNeSBwcxLjE4LjE3oAfdwwGyBwcwLjE4LjE3uAe-NsIHBzExLjE3LjjIB04&sclient=gws-wiz You could do a lisp that saves the two objects handles and use the reactor on close, save & quit to update via lisp the objects. I have used save etc to do something. I use ldata to save values in a dwg so you would have one data value which is how many, then you would have multiple values saved. The other method is to use Xdata on say the text saving the block ID. Again the handle. Doing the text on specific layers may make it fast to check v's getting all text in the dwg. 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.