GegH Posted February 12, 2011 Share Posted February 12, 2011 So new in fact it all looks very confusing. I have a script to run global Attribute edit Command: -ATTEDIT Edit attributes one at a time? [Yes/No] : N Edit only attributes visible on screen? [Yes/No] : Y Enter block name specification : Tree Enter attribute tag specification : PlantID Enter attribute value specification : 1 attributes selected. Enter string to change: . Enter new string: this runs off a icon ^c^c^c_-attedit;n;y;tree;plantid;;\;;\; I am trying to run it from a VBA form, activated by the icon. Firstly I would like it to replace the whole string to change regardless of what is entered there, if that is possible. The form would also have a text box to enter the new string if you know it (as a code), and a browse button if you don't. Clicking the browse button would open a second form that is connected to a database (Plant.mdb) which has plant names and codes that you can select. on selection it fills out the text box for you. As i say, i am new to this and can't even get VBA to run the basic script, which would be a good start to my learning curve. All help is greatly appreciated Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 18, 2011 Share Posted February 18, 2011 Serach the posts here under BIGAL I have posted a few times a simple VBA code for changing the attributes for a given block name no matter how many or where in a dwg. "BIGAL" "Attributes" Quote Link to comment Share on other sites More sharing options...
GegH Posted February 20, 2011 Author Share Posted February 20, 2011 BIGAL, Is this the thread you were talking about http://www.cadtutor.net/forum/showthread.php?8178-modifying-block-entities. By the way, did you ever find out how to create a tiny drawing? Quote Link to comment Share on other sites More sharing options...
fixo Posted February 20, 2011 Share Posted February 20, 2011 Upload the screenshot of your Access table and the sample drawing with a few blocks, perhaps I can help ~'J'~ Quote Link to comment Share on other sites More sharing options...
GegH Posted February 20, 2011 Author Share Posted February 20, 2011 The idea would be to insert the Plant Code but to identify the code by choosing the Latin name (Plant Name) and/or Common Name, my latin is terrible. I will probably end up filtering/querying the database by Shrub, Tree, Groundcover, etc... but if i understand the code i will do this later. Thankyou so much for your help, i am going nowhere fast. TreeBlockExample.dwg Quote Link to comment Share on other sites More sharing options...
fixo Posted February 21, 2011 Share Posted February 21, 2011 Ok that make a sense I'll do it tomorrow Quote Link to comment Share on other sites More sharing options...
fixo Posted February 22, 2011 Share Posted February 22, 2011 PlantDB.zipChange to your suit You have to edit database file name etc I'll busy next few days Quote Link to comment Share on other sites More sharing options...
GegH Posted February 28, 2011 Author Share Posted February 28, 2011 Sorry Fixo, I have been a little pre occupied over the last few days with a bit of an earthquake in Christchurch. Our house is fine, so is the family, but we thought it prudent to leave the area for a little while. At the moment i am in Australia for a week and have only just managed to get online. Thankyou for your help and work, i will take a look tomorrow and see if i can make it work. Quote Link to comment Share on other sites More sharing options...
fixo Posted February 28, 2011 Share Posted February 28, 2011 Sorry Fixo, I have been a little pre occupied over the last few days with a bit of an earthquake in Christchurch.Our house is fine, so is the family, but we thought it prudent to leave the area for a little while. At the moment i am in Australia for a week and have only just managed to get online. Thankyou for your help and work, i will take a look tomorrow and see if i can make it work. Oh, man Glad The God blesssed your family I've watched TV about this ugly trouble, very sorrowed indeed But...no worries, Let me know if something is wrong in there, still waiting for, Regards, Oleg Quote Link to comment Share on other sites More sharing options...
GegH Posted March 1, 2011 Author Share Posted March 1, 2011 Thankyou for your kind thoughts, it is quite upsetting to see such a beautiful city so desimated and with such a loss of life. I had a go with the App, it seems when i click 'Apply to Blocks' a dialogue box opens telling me to try other block. I did find another command 'GATTE' which is essentially what i need to do: Command: gatte Initializing... Select block or attribute [block name]: Known tag names for block: PLANTID Select attribute or type attribute name: Block: Tree Attribute tag: PLANTID Enter new text: AcBr Number of inserts in drawing = 7 Process all of them? [Yes/No] : NO Select objects: Specify opposite corner: 4 found Select objects: Please wait... 4 attributes changed But rather than typing the new Code, we pick it from the list in your dialogue box. I'm not sure if this makes the task simpler or not. I really appreciate your help with this Quote Link to comment Share on other sites More sharing options...
fixo Posted March 1, 2011 Share Posted March 1, 2011 I'm pretty sure you'll restore this nice town and all the buidings you've loved before Not so quick of course, anyway Ok, back to App, what I understand from your explanation: you want to add possibility to change all blocks or just the blocks that you've selected on screen Think in this case we need to drop on form 2 radio buttons for that Am I right? Quote Link to comment Share on other sites More sharing options...
GegH Posted March 1, 2011 Author Share Posted March 1, 2011 More often than not it will be selecting certain blocks on the screen. Designers are a flaky bunch who constantly change their minds, and clients tend to not know their minds until you're on site. The radio buttons sound like a great idea. Quote Link to comment Share on other sites More sharing options...
fixo Posted March 1, 2011 Share Posted March 1, 2011 Ok, see private message, please I need your working drawing ( I use A2009) Talk to you soon Oleg 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.