PDA

View Full Version : Eliminating extra spaces in Long Description



Aplant Monkey
04-06-2010, 06:31 AM
So I am sure if you have toiled with Spec Gen long enough you have found that first of all it sucks. But eventually you will need to come up with a method by which to auto populate the Long Descriptions (LD). The
Default Description Build will do this for you. However there will ofter come times where you want to set up conditions where if a certain field is not populated then you do not want a blank space contained within your LD. In order to accomplish this you will need to add the following procedure.

Lets say you are doing a Valve LD and want the following criteria for your LD.

<<SHORT_DESC>> <<TRIM_1>> <<SCHED_DESC>> <<MATERIAL>> <<VALVE_CODE>>

This will produce a LD something like this:

BALL VALVE THRD FP CL800 API ASTM A105N BA999

Problem is that sometimes we will not have the FP as part of the LD and sometimes you will depending on the valve. In order to accomplish you you can do the following

<<SHORT_DESC>>[ ]<<TRIM_1>> <<SCHED_DESC>> <<MATERIAL>> <<VALVE_CODE>>

this will allow you to leave the <<TRIM_1>> blank and not have extra spaces. The [] will only put the space if there is content within the <<TRIM_1>> field.

tkmashl
04-06-2010, 07:02 AM
Nice tip! It looks like you added the field for the schedule description?

Aplant Monkey
04-06-2010, 07:07 AM
yes the Sched_Descr was added to this spec. This allows for items that may have two specs such as reducers or Olets or just a better descr of what you want to see rather than just the Spec