broncos15 Posted October 25, 2016 Share Posted October 25, 2016 So I am working on a program that would make use of Lee Mac's ObjectDBX Wrapper found at http://www.lee-mac.com/odbxbase.html. The purpose of the program is to strip all fields in text, mtext, multileaders, dimensions, and blocks then replace them with just the text value (i.e. if the field had 5' it would be replaced with just text that says 5') in all drawings in a particular folder. I know how to do this using just dxf codes but my solution has to use Visual LISP because of the limitations of ObjectDBX. My quick solution for mtext for example, is to do something like this: (setq txt (vla-get-textstring obj)) (vla-put-textstring obj "Hi") (vla-put-textstring obj txt) This seems to work fine, but I am unsure if this would work all of the time? Could I use this same idea for blocks and dimensions as well? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 26, 2016 Share Posted October 26, 2016 The vla-put-textstring may vary within the object type, for text, mtext it will work in a block you need to get-attributes then vla-put-textstring att "hi" same with dims but Measurement = 4609.26 not textstring. Use dumpit.lsp to find. Quote Link to comment Share on other sites More sharing options...
broncos15 Posted November 16, 2016 Author Share Posted November 16, 2016 BigAl, thank you for the help! I'll research all the different methods for each different object that can have a text value. Quote Link to comment Share on other sites More sharing options...
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.