08-24-2007, 03:44 PM
|
#2 (permalink)
|
|
CEO - President
Join Date: Mar 2006
Posts: 108
|
Originally Posted by bfourney
|
What determines the connector shape and color for the rough in wire? Some of the wires appear as different colors and some appear with different types of line ends by default for no apparent reason. I assume this is tied to some properties of the wire, but what are they?
Bryn
|
It is a formula in the wire shape based on the wire type. For example a video wire type is red with a solid arrow. If you open the shapesheet of a wire shape and look in the User-Defined Cells section you will see two formulas that look like this:
User.LineColor: =IF(LOOKUP(Prop.Type,"video")=0,2,IF(LOOKUP(Prop.T ype,"audio")=0,4,IF(LOOKUP(Prop.Type,"control")=0, 20,IF(LOOKUP(Prop.Type,"phone")=0,6,IF(LOOKUP(Prop .Type,"data")=0,12,IF(LOOKUP(Prop.Type,"rgb")=0,3, IF(LOOKUP(Prop.Type,"rf")=0,5,0)))))))
User.LineEnd: =IF(LOOKUP(Prop.Type,"video")=0,13,IF(LOOKUP(Prop. Type,"audio")=0,14,IF(LOOKUP(Prop.Type,"control")= 0,7,IF(LOOKUP(Prop.Type,"phone")=0,14,IF(LOOKUP( Pr op.Type,"rgb")=0,14,IF(LOOKUP(Prop.Type,"data")=0, 13,IF(LOOKUP(Prop.Type,"rf")=0,7,14)))))))
__________________
Adam Stone
President
D-Tools, Inc
|
|
|
|
08-27-2007, 09:26 PM
|
#3 (permalink)
|
|
Guest
|
That's awesome, thanks for the info! Now the question is can I create a new stencil or modify these properties to my own liking? For instance assign colors to new types that I define?
|
|
|
|
|
08-27-2007, 10:23 PM
|
#4 (permalink)
|
|
CEO - President
Join Date: Mar 2006
Posts: 108
|
Originally Posted by bfourney
|
|
That's awesome, thanks for the info! Now the question is can I create a new stencil or modify these properties to my own liking? For instance assign colors to new types that I define?
|
Sure, code is pretty self explanatory. Remember to make BU copies of the ordinals.
__________________
Adam Stone
President
D-Tools, Inc
|
|
|
|
08-30-2007, 01:59 PM
|
#5 (permalink)
|
|
Member
Join Date: Aug 2007
Posts: 40
|
By the way, those long fields can be shortened and made more readable. Try these:
User.LineColor = INDEX(LOOKUP(Prop.Type,
"video;audio;control;phone;data;rgb;rf"),
"2;4;20;6;12;3;5",,0)
User.LineEnd = INDEX(LOOKUP(Prop.Type,
"video;audio;control;phone;data;rgb;rf"),
"13;14;7;14;14;14;7",,14)
In this way, you can match the list of possible Prop.Type values with a list of color- or LineEnd values. The very last value, after the double-comma is the default value if the INDEX function finds no match. Ie: you'll get color 0 and LineEnd 14 if Prop.Type = "Bob".
|
|
|
|
08-30-2007, 02:55 PM
|
#6 (permalink)
|
|
CEO - President
Join Date: Mar 2006
Posts: 108
|
Originally Posted by Visio Guy
|
By the way, those long fields can be shortened and made more readable. Try these:
User.LineColor = INDEX(LOOKUP(Prop.Type,
"video;audio;control;phone;data;rgb;rf"),
"2;4;20;6;12;3;5",,0)
User.LineEnd = INDEX(LOOKUP(Prop.Type,
"video;audio;control;phone;data;rgb;rf"),
"13;14;7;14;14;14;7",,14)
In this way, you can match the list of possible Prop.Type values with a list of color- or LineEnd values. The very last value, after the double-comma is the default value if the INDEX function finds no match. Ie: you'll get color 0 and LineEnd 14 if Prop.Type = "Bob".
|
Thanks for the tip, much better I wrote those formulas back in 98 and they haven't changed since.
__________________
Adam Stone
President
D-Tools, Inc
|
|
|
|
09-08-2007, 01:44 AM
|
#7 (permalink)
|
|
Guest
|
Thanks for the help guys, I have successfully made my own custom Rough-In wire stencil. I even added a User.LineWeight property!
Yeah thanks Visio Guy, that syntax is much easier. I figured there must be some way to list fields like that, I just didn't have time to play with it.
Also, in the original formula it lists two sets of values for each property like IF(LOOKUP(Prop.Type,"video")=0,2 - The first digit always 0, but Visio Guy's formulas don't have these zeros...
|
|
|
|
|
09-08-2007, 08:31 PM
|
#8 (permalink)
|
|
Senior Member
Join Date: Mar 2006
Posts: 235
|
Originally Posted by bfourney
|
Thanks for the help guys, I have successfully made my own custom Rough-In wire stencil. I even added a User.LineWeight property!
Yeah thanks Visio Guy, that syntax is much easier. I figured there must be some way to list fields like that, I just didn't have time to play with it.
Also, in the original formula it lists two sets of values for each property like IF(LOOKUP(Prop.Type,"video")=0,2 - The first digit always 0, but Visio Guy's formulas don't have these zeros...
|
Chris accomplishes the same thing by use ",,0)" in his version.
__________________
Graham Hickerson
Sound & Image Design, Inc.
1312 N. Parham Road
Richmond, VA 23229
graham@soundandimage.com
804.741.5816
|
|
|
|
11-09-2009, 08:29 PM
|
#9 (permalink)
|
|
Junior Member
Join Date: Sep 2008
Posts: 24
|
Hey guys, if you're still out there monitoring this thread, where do I get the color=number scheme? I want to do this but don't know which numbers to assign.
__________________
Mark Midyett
CPD, CPI 1
|
|
|
|
11-10-2009, 05:42 AM
|
#10 (permalink)
|
|
Super Moderator
Join Date: Nov 2006
Posts: 430
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 08:01 AM.
|
|