quietman187 Posted May 16, 2014 Share Posted May 16, 2014 Good day all! On the attached file, I would like to enter the address, and the switches set themselves to the proper binary arrangement. How does one do this? I'm a 2D electrical user, I have no cad knowledge beyond that. Is this something very hard to do? dip switch.dwg Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 16, 2014 Share Posted May 16, 2014 Eight switches means you could have a fair number of binary arrangements right? Quote Link to comment Share on other sites More sharing options...
quietman187 Posted May 16, 2014 Author Share Posted May 16, 2014 Yes, Up to 256. Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 16, 2014 Share Posted May 16, 2014 That's what I figured. And you want to do this in a dynamic block huh? That might require some thought. Quote Link to comment Share on other sites More sharing options...
quietman187 Posted May 16, 2014 Author Share Posted May 16, 2014 Well, it does not have to be dynamic block.. whatever "works". I dug around the internet and could not find too much info about it, I was thinking someone has been through this before and I can just copy their block. If its too difficult, I will adjust them manually as usual, I just have a huge project coming up. (189 devices). Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 16, 2014 Share Posted May 16, 2014 Not sure what you mean by "adjust them manually". Would you use a Visibility parameter? Quote Link to comment Share on other sites More sharing options...
quietman187 Posted May 16, 2014 Author Share Posted May 16, 2014 I don't know what a Visibility parameter is.. Adjusting them manually= picking the boxes and sliding them up and down... it plays hell on your fingers with the amounts of clicking. Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 16, 2014 Share Posted May 16, 2014 You specifically asked about dynamic blocks so I thought you at least read up on them before inquiring. Let me give you an example of a visibility parameter. You could have a device with just one switch. The switch would either be "on" or it would be "off". You would construct the block showing both conditions then using the BEDIT command open the block editor and apply your visibility parameters such that when the switch is "on" it is shown in one position but the "off" position is invisible. When the switch is "off" the reverse would be true. I suppose you could create the device with eight switches and use this method to turn each switch either on or off. Quote Link to comment Share on other sites More sharing options...
Bogbadbob658 Posted May 16, 2014 Share Posted May 16, 2014 I've attached a dynamic. Select the block then click the blue arrows to change the settings of the switches. Is this what you want? dip switch2.dwg Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 16, 2014 Share Posted May 16, 2014 ^^^Basically what I described although the OP seemed to be saying he wanted to enter an "address" and have the switches automatically set themselves to the right position. I vote for the design above. Quote Link to comment Share on other sites More sharing options...
quietman187 Posted May 16, 2014 Author Share Posted May 16, 2014 I've attached a dynamic. Select the block then click the blue arrows to change the settings of the switches. Is this what you want? Not sure, Can you save in 2010 format and repost? I can't open it. Quote Link to comment Share on other sites More sharing options...
Bogbadbob658 Posted May 16, 2014 Share Posted May 16, 2014 Try this one dip switch3.dwg Quote Link to comment Share on other sites More sharing options...
quietman187 Posted May 16, 2014 Author Share Posted May 16, 2014 HEY! that is pretty cool... I was hoping to enter the address then the switches would move themselves based on the binary ... but this will definitely work and save time! Thanks a bunch. Leave your paypal addy and I can donate a small bunch.. Quote Link to comment Share on other sites More sharing options...
Mike_Taylor Posted May 16, 2014 Share Posted May 16, 2014 Using fields and attributes you could most likely generate the binary based on the positions in the block. I am fairly certain outside of using a custom LISP routine you wouldn't be able to have the block do what you want exactly. Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 16, 2014 Share Posted May 16, 2014 And how long would you'd say that would take to do? Quote Link to comment Share on other sites More sharing options...
ROBP Posted May 17, 2014 Share Posted May 17, 2014 If only dynamic block could be linked to an excel file and using the if command would be a breeze to do along with lots of other projects in mind. Maybe i should add it to the wish list in cad future releases versions. Again if any forum member users does have a way to insert new commands in the dynamic block editor cui toolbar to do so or abling formulas in the lookup table to expand variables to use when special calculations in reference with others are needed please share it. Quote Link to comment Share on other sites More sharing options...
steven-g Posted May 19, 2014 Share Posted May 19, 2014 Bit late, but this will do it using decimal input, click on the block and in the properties pallete chose the "Decimal value" (0 has to be entered as .5 just because a line cannot have zero length), or you can directly choose the binary value from the lookup, or use the stretch arrow above the block - I only filled in the values up to 32. I couldn't get it to accept typing in the binary values directly into the lookup for some reason. When you change the value it will need a regen to update properly. dip switch.dwg Quote Link to comment Share on other sites More sharing options...
quietman187 Posted May 19, 2014 Author Share Posted May 19, 2014 Hey its never too late mate, this is an ongoing project. Thanks for the help. Quote Link to comment Share on other sites More sharing options...
neophoible Posted May 19, 2014 Share Posted May 19, 2014 steven-g, nice job. I'd thought about doing something similar, but decided that 256 variants in a table was just too much. Now I'm wondering if handling it as two sets of four switches might be workable somehow and still retain the tables. I don't usually work directly with binary, so I don't know how those who do would be able to incorporate the idea. I would think a LISP routine could handle it quite easily that way. Well, just a wild thought. Quote Link to comment Share on other sites More sharing options...
Ski_Me Posted May 20, 2014 Share Posted May 20, 2014 LISP could handle it since it is a math related function. My question would be how could you extract data from each block that you place from it's attribute then tell it to move the switches based on that data. That would be one hell of a script. 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.