spakis Posted August 17, 2010 Share Posted August 17, 2010 Hi, I'm looking for some help on how to generate terminal strips from wiring diagrams. I'd like to write a macro in Autocad(autolisp or VBA) wich generates terminal strips I use terminal, contact and etc. blocks to draw wiring diagrams. I know how to find all blocks in a drawing, but have no idea how to determine connections and wire numbers between them. Any tips on how this could be done appreciated. Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 17, 2010 Share Posted August 17, 2010 It sounds like you should be using AutoCAD Electrical and not plain AutoCAD. What parameters would you be looking to use to generate the terminal strips? Have you considered the use of a Dynamic Block? Quote Link to comment Share on other sites More sharing options...
spakis Posted August 17, 2010 Author Share Posted August 17, 2010 It should look something like this: from device from wire terminal number to wire to device. What do you mean by dynamic block? I have a block for single terminal, but i need to enter wire number and other data manualy it's quite time consuming and there is quite a chance of making a mistake, so i'd like to auomate this process. Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 17, 2010 Share Posted August 17, 2010 Dynamic Blocks were introduced in 2006. Some features of Dynamic Blocks: Stretching, Moving objects within a block, Rotating, Changing views, Array objects within a block and stretch, move, rotate and array using pre-defined distances. Consult your AutoCAD Help files and User's Guide for an overview of Dynamic Blocks. There is a very good chance you have access to some examples of Dynamic Blocks on your Tool Palettes. Look on the Electrical tab. There should be one for a pilot light, limit switch, push button and relay. Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 17, 2010 Share Posted August 17, 2010 Dynamic Blocks Best Practices Series http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=13785033 Quote Link to comment Share on other sites More sharing options...
SteveK Posted August 17, 2010 Share Posted August 17, 2010 It should look something like this:from device from wire terminal number to wire to device. spakis, are these text inputs that accompany each block? If so then you might be better off creating a block with tags, then use a lisp to collect the blocks and somehow increment numbers in specific tags. Post a picture if you can. Quote Link to comment Share on other sites More sharing options...
spakis Posted August 17, 2010 Author Share Posted August 17, 2010 Oh, i've been using dynamic blocks before, but that doesn't solve my problem. This is a example circuit: What i'd like to know how to programaticaly find out connections between terminal X1-1 and KL1-11, KL1-12 and X1-2 and so on. I also need to get wire numbers of these connections, but i can't come up with solution. Quote Link to comment Share on other sites More sharing options...
SteveK Posted August 17, 2010 Share Posted August 17, 2010 Ok, so obviously you'd use AutoCAD Electrical as ReMark suggested if you had it so we'll rule that out (though if you do this offen maybe you should think about it). What i'd like to know how to programaticaly find out connectionsbetween terminal X1-1 and KL1-11, KL1-12 and X1-2 and so on. Yeah I'm not sure how a custom lisp could come up with the value (eg) 100 between X1-1 and KL1-11, unless it retrieves it from that table you've included in the picture - which would be difficult if the table can not be collected into a list. Not a great solution, but if the values X1, 1 and 100 are tags in the block, then a simple lisp could be made to increment the number in that tag when a block is selected, but that's not hugely helpful.. Maybe someone else has an idea. Quote Link to comment Share on other sites More sharing options...
Electroman7979 Posted December 14, 2010 Share Posted December 14, 2010 Have you figured out how to make this easier? AutoCAD electrical is pretty automated, when you insert the TB you just tell it location and terminal strip identifier. You can even do multiple insertions with similar attributes. 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.