dessoft - tag rules, how to do it

12
© 2010 DesSoft Tag Rules Version: 1.0.0

Upload: dessoft-control-and-instrumentation-engineering-software

Post on 26-Jun-2015

88 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: DesSoft - Tag rules, How to do it

© 2010 DesSoft

Tag Rules

Version: 1.0.0

Page 2: DesSoft - Tag rules, How to do it

All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, ormechanical, including photocopying, recording, taping, or information storage and retrieval systems - without thewritten permission of the publisher.

Products that are referred to in this document may be either trademarks and/or registered trademarks of therespective owners. The publisher and the author make no claim to these trademarks.

While every precaution has been taken in the preparation of this document, the publisher and the author assume noresponsibility for errors or omissions, or for damages resulting from the use of information contained in this documentor from the use of programs and source code that may accompany it. In no event shall the publisher and the author beliable for any loss of profit or any other commercial damage caused or alleged to have been caused directly orindirectly by this document.

Printed: February 2010 in Eldoraigne, South Africa

Tag Rules

© 2010 DesSoft

Publisher Special thanks to:

All the people who contributed to this document.DesSoft

Page 3: DesSoft - Tag rules, How to do it

3Contents

© 2010 DesSoft

Table of Contents

Foreword 0

Section I Tag Rules 6

................................................................................................................................... 71 User Interface

................................................................................................................................... 92 Exercise (without Tag Rules)

................................................................................................................................... 103 Exercise (with Tag Rules)

................................................................................................................................... 114 Internal Functions

Index 0

Page 4: DesSoft - Tag rules, How to do it
Page 5: DesSoft - Tag rules, How to do it

Tag Rules

DesSoft - Engineering Design Documentation Software

Section

I

Page 6: DesSoft - Tag rules, How to do it

6 Tag Rules

© 2010 DesSoft

1 Tag Rules

Tag Rules are used to:

· Eliminate unnecessary typing like populating the Area, Func and Num fields from the TagNumber.

· To assign standard values to fields for specific type of components like "ELE" to the CTypefield for an electrical cable tag rule, etc.

· To derive correct tag numbers when using Speed Tools such as the Library, etc. · To create links to additional tables while creating tag numbers.

Tag Rules are not required to create a Tag Number, but is required to be used with the SpeedTools later in the project phase. Therefore it is best to define and use these tag rules.

Page 7: DesSoft - Tag rules, How to do it

7Tag Rules

© 2010 DesSoft

1.1 User Interface

The Tag Number window will be opened whenever a Tag has to be created or renamed and isopened from various modules like the Components, Documents, Racking and Routing, etc.

· Tag Number Section - All the Tag Number related information is supplied here.· Tag Rule Section - All the Tag Rule related information is supplied here.· Tag Format - This merely what is entered in the Tag Format field in the Tag Rule Section.

(This is useful for the designer to see what the selected Tag Rule is designed for)· Tag Rule Warning Note - This note appears when your Tag Rule contains a <TagNum>

rule line. It means that the content of the Tag Number field doesn't matter, because the TagNumber of the new component is already defined in the <TagNum> rule line.

· Rule Line - Each part of the Tag Number you wish to break down in order to populate it in acertain field/column, requires its own rule line.

· <TagNum> rule line - This line states what the Tag Number of the new component mustbe. It overrides the Tag Number field in the Tag Number Section and is always red in color.It triggers the Tag Rule Warning Note.

· Result - This field produces the result of the rule specified in the same Rule Line.· Additional Tables - User custom defined tables are seen as "Additional Tables" in the

system. Users may add their own tables with their own columns as required. These tablescan then be linked to 1Des tables via a Tag Rule. If a table needs to be linked to a 1Destable a field as the primary key needs to be added in the table. This field name has to be theTable's name plus "ID" e.g. if the table name is "ProcessData" the field required is"ProcessDataID" and has to be of type Long Integer or equivalent. Then this table name hasto be entered into the AdditionalTable field in the TagRules table next to the Tag rule that isused to create the specific component. More than one table can be linked to the same tag

Page 8: DesSoft - Tag rules, How to do it

8 Tag Rules

© 2010 DesSoft

rule by just adding all the table names into the AdditionalTable field separated by a comma.When an additional table is setup as described, 1Des will create a record in the additionaltable each time a record is created for the component using the tag rule. The component'sunique key will be written into the additional table's "*ID" field so that there will be anautomatic relation between these tables. Once the relation is established and the linkedrecords are found, these additional tables fields can then be used in document tokens anddatasheets. By defining a new query a new report can be created that can display allrelevant information.

If the Tag Number Window is open and the Tag Rule Section is not visible, then click on theShow>> button to open the Tag Rule Section.A Rule Line is created for each field in the database that must be updated or needs to bepopulated with known information regarding the Tag Rule e.g. if a tag number consist of an Area, aFunctional identifier and a Number part then the Area, Func and Num fields can be updatedrespectively from the tag number as well as known fields like in the above figure where theCircuitType field will have the value of "DOL". Thus a rule is built starting with the field name that must be populated, assigning the formula withan equal "=" character. The formula can be built with static text values identified between doubleinverted commas or using Internal Functions to derive values from the tag number or group tagor by a combination of other fields, static text and internal functions.

Note1: There are only 2 GROUP TABLES in the software namely Loop and Panel table.Whenever the Tag Number is typed in for the group table (Loop or Panel), the Group Tag text boxis updated accordingly. i.e. the GroupTag is typed into the TagNumber text box for the group tableand the correct Tag Rule will update the tag number field for the component which derives the tagnumber from the group tag.

Note2: The Group Tag text box will display the associated group component's tag number whencreating a tag number that is associated with the group item i.e. when creating a cable for a fieldpanel, the Group Tag will display the panel's tag number which can be used with tag rules tocreate the cable number.

11

Page 9: DesSoft - Tag rules, How to do it

9Tag Rules

© 2010 DesSoft

1.2 Exercise (without Tag Rules)

Create a Junction Box

1. Click on the Go Button > Components.2. Click on Field Panels in the List Options.3. In the Components ribbon bar, click on Panels > Field Panels.4. Under Tag Number, enter 20-JBA-01.5. Click Ok.

Create a Tstrip and a Cable for the JB

6. On the components window that just opened, click on Tstrips.7. In the New Component Items ribbon bar, click Tstrip.8. Under Tag Number, enter TS-10-JBA-01.9. Click Ok.10.On the components window, click on Cables.11.In the New Component Items ribbon bar, click Cable.12.Under Tag Number, enter C-10-JBA-01.13.Click Ok.

14.Create a library item of the JB.15.Look in the Panel, Tstrip and Cable tabel and note that only the Tagnum fields have been

populated for each component.16.Return to the Components module and create 5 JBs (20-JB-20 - 20-JB-24).17.Build the new JBs from the library item we created.18.Open the new JBs from the Tag List.

Note that the Tstrips and Cables were not numbered correctly, due toincorrect Tag Rules that were used.

Page 10: DesSoft - Tag rules, How to do it

10 Tag Rules

© 2010 DesSoft

1.3 Exercise (with Tag Rules)

Create a Junction Box

1. Click on the Go Button > Components.2. Click on Field Panels in the List Options.3. In the Components ribbon bar, click on Panels > Field Panels.4. Under Tag Number, enter 100-JBA-01.5. Under Tag Rules, select PanelField.6. Click Ok.

Create a Tstrip and a Cable for the JB

7. On the components window that just opened, click on Tstrips.8. In the New Component Items ribbon bar, click Tstrip.9. Under Tag Number, enter TS-100-JBA-01.10.Under Tag Rules, select Tstrip.11.Click Ok.

Note that the Tag Number you entered didn't matter! This is because of theTagNum Rule Line in the Tag Rule.

12.Under Tstrips, select 100-JBA-01.13.In the Component Item Actions ribbon bar, click Rename.14.Modify the Tagnum Rule Line to: TagNum="TS-"+Area+"-"+Func+"-"+Num15.Click Update.16.Click Ok.17.On the components window, click on Cables.18.In the New Component Items ribbon bar, click Cable.19.Under Tag Number, enter C-100-JBA-01.20.Under Tag Rules, select Cable.21.Click Ok.

Note that the Tag Number you entered didn't matter! This is because of theTagNum Rule Line in the Tag Rule.

22.Under Cables, select 100-JBA-01.23.In the Component Item Actions ribbon bar, click Rename.24.Modify the Tagnum Rule Line to: TagNum="C-"+Area+"-"+Func+"-"+Num25.Click Update.26.Click Ok.

27.Create a library item of the JB.28.Look in the Panel, Tstrip and Cable tabel and note that all the fields specified in the Tag

Rule rule lines have been populated for each component.29.Return to the Components module and create 5 JBs (100-JB-20 - 100-JB-24).30.Build the new JBs from the library item we created.31.Open the new JBs from the Tag List.

Note that the Tstrips and Cables were numbered correctly, due to correctTag Rules that were used.

Page 11: DesSoft - Tag rules, How to do it

11Tag Rules

© 2010 DesSoft

1.4 Internal Functions

There are just a few internal functions available to the user that can be used when designingTag Rules.

1. GetS function (Get Substring)The GetS function will get a substring from the string passed as a parameter. Definition: GetS(nPos, String, Delimiter) wherenPos (number) is the position of the substring inside the string.String (text) is the passed string to the functionDelimiter (text) is used to determine the count for nPos. By default the delimiter is a "," andwhen it is something else one has to specify it.

E.g. to get the function (second) part out of a tag number (string) that consists of area-func-num ("-" is the delimiter) the function will be: GetS(2,"22-M-01","-") = "M"If the string must be a specific field in the database then the field name has to be passed like:GetS(2,TagNum,"-") = "M"

· A literal string value must be passed with inverted commas ("). When a reference to a textfield is passed as the string value, then the field name without the inverted commas is typed.

· A number is also passed without the inverted commas. A number reference is treated thesame as above.

2. GetL function (Get the Left part of a string)The GetL function will get the specified amount of characters from the left of the string.Definition: GetL(nPos, String) wherenPos (number) is the amount of characters from the left in the string.String (text) is the passed string to the function

E.g. GetL(2,"ABCD-123-EFG") = "AB"

3. GetR function (Get the Right part of a string)The GetR function will get the specified amount of characters from the right of the string.Definition: GetR(nPos, String) wherenPos (number) is the amount of characters from the right in the string.String (text) is the passed string to the function

E.g. GetR(2,"ABCD-123-EFG") = "FG"

4. GetN function (Get the Number part of a string)The GetN function will get the first numbers found from the string.Definition: GetN(String) whereString (text) is the passed string to the function

E.g. GetN("ABCD123-EFG") = "123"

5. GetC function (Get the Character part of a string)The GetC function will get the first characters found from the string.Definition: GetC(String) whereString (text) is the passed string to the function

E.g. GetC(GetS(1,"123ABCD-EFG",”-“)) = "ABCD"

Page 12: DesSoft - Tag rules, How to do it

12 Tag Rules

© 2010 DesSoft

6. GetP function (Get the Position character in a string) (only 2 parameters)The GetP function will get the character from the string at the specified position.Definition: GetP(nPos, String) wherenPos (number) is the position of the character counted from the beginning of the string.String (text) is the passed string to the function

E.g. GetP(2,"ABCD123-EFG") = "B"

7. GetP function (Get the Part of a string) (3 parameters)The GetP function will get part of the string from the specified position for an amount ofcharacters.Definition: GetP(nPos, String, nAmount) wherenPos (number) is the position of the character counted from the beginning of the string.String (text) is the passed string to the functionnAmount (number) is the amount of characters to return from the defined position in thestring.

E.g. GetP(3,"ABCD123-EFG",4) = "CD12"

8. GetX function (Get the NeXt value from the last character in a string)The GetX function will get the next incremented value for the last character in a string. It canbe a numeric value or a string value.Definition: GetX(String) whereString (text) is the passed string to the function

E.g.1. GetX("ABCD123-EFG") = "ABCD123-EFH"E.g.2. GetX("ABCD123") = "ABCD124"

9. GetX function (Get the NeXt incremented count value from the last character in a string)The GetX function will get the next incremented count value for the last character in a string. Itcan be a numeric value or a string value.Definition: GetX(String, nCount) whereString (text) is the passed string to the functionnCount (number) is the amount that the last character in the string needs to be incremented.

E.g.1. GetX("ABCD123-EFG",3) = "ABCD123-EFJ"E.g.2. GetX("ABCD123",3) = "ABCD126"

10. The above functions can be called as a combination like:E.g. TagNum = "22-M-001AB"GetR(2,GetS(3,TagNum,"-")) = "AB"

The function will always first evaluate the function within the brackets and work its way to theoutside. Thus the above example will first return the "GetS(3,TagNum)" that equals "001AB"then run the "GetR(2" part of the function which results in "AB".