How do i plot only the soil classification and not the additional descriptions on a fence

i.e. Sandy Silt and not any additions like -moist,dense,etc even though it's in the lithology description.

 Hoping to have the layout like this.

  • Ok, I worked up a little example to demonstrate how this can easily be done.  My example data is shown in the picture below.  Note that it has a portion of the long description bolded.  I set up various scenarios on the location of the bolding and the contents of the bolding to test how the expression reacts to unexpected conditions.  The description of each scenario is in red to the right.

    I created a text vs depth entity on a typical fence diagram that is set to right justify with block alignment centered vertically using the following text expression:

    <<Remark(Locate position of first bold mark)>>_
    <<Remark(add 5 to location to identify beginning of text)>>_
    <<Remark( to be extracted)>>_
    <<Let(XBegin=_
        <<Calc(<<InStrAtOccurrence(<<LITHOLOGY.Description>>,"<<B>>",1)>>+5)>>_
    )>>_
    <<Remark(Find lposition of second bold mark in description)>>_
    <<Let(XEnd=_
        <<InStrAtOccurrence(<<LITHOLOGY.Description>>,"<<B>>",2)>>_
    )>>_
    <<Remark(Calculate length of string to extract)>>_
    <<Let(XLength=_
        <<Calc(<<Get(XEnd)>>-<<Get(XBegin)>>)>>_
    )>>_
    <<Remark(Extract the desired text from the description string)>>_
    <<Mid(_
        <<LITHOLOGY.Description>>,_
        <<Get(XBegin)>>,_
        <<Get(XLength)>>_
    )>>

    The expression above is much more verbose than necessary and can be shortened significantly.  I included remarks and used let and get variables to enhance understanding. Note that the InStr function will return the beginning position of the 5 character bold mark so it is necessary to add 5 to the returned position to locate the beginning position of the text to be extracted.  Everything else is pretty straight forward.

    The entity creates the following output with the example data above.

    Note that only the text in the long description that is between the bolding marks is printed to the left of the output column.  As expected, if no bolding is found, the expression prints nothing. I did not test what happens if only one bolding mark is found but it would be worth checking. If it does not give you what you expect you can modify the expression to deal with that situation.

    I hope this gives you some insight on how various components of a long description string can be extracted for use in reports or other expressions.  There just has to be a unique and repeatable way of locating the desired component in the long description.

    Any questions please respond to this thread.

  • You can do this using the current description field as is; provided ALL descriptions are entered using uniform formatting. In the example you provided above, you could search the text string for the position of the first and second bolding marks, then extract the text between them for display on your column. This only works if you always bold the text you want on your column or use some other uniform way (such as all text before the first period) to determine the text to extract. Anything else can be extracted from a long description as well. For example, you could extract the color to control the color of your graphics if it is ALLWAYS the word between the second and third comma. If you are hand entering your descriptions, the probability of a description being written in a different order or using different punctuation/ formatting is high.  A component description model using pick lists for each component reduces this probability. I do not have a computer with gINT available right now but if you want help writing a function to extract the desired text, let me know and I will provide more insight mid next week.

  • Hi Mark,

    Here are a couple of guides about the topics you are discussing (using a component model for lithology descriptions and coloring symbols from an input field, or coloring the symbols themselves)

    If you would like to email me privately I would be happy to call and help modify your customized gINT files. Just click on my name and send me a message.

    by Pat Cummings » Wed Jul 15, 2009 8:06 am Component descriptions automatically combine data from many fields into one combined description at output. This creates consistency, the ability to validate…
    Last edited in OpenGround | gINT | Keynetix > gINT | Keynetix Wiki

    Also How to guide in gINT.... goto Help ...Search Assigning Colors to Graphic Column Sections (how-to guide)

    by Pat Cummings » Wed Aug 26, 2009 9:23 am You can create log reports with colorful material graphics. By simply adding a field to your database populated with codes of colors already inherent to the…
    Last edited in OpenGround | gINT | Keynetix > gINT | Keynetix Wiki

    Applies To Product(s): gINT Logs, gINT Professional, gINT Professional Plus Version(s): 8.x Environment: N\A Area: Symbol Design …
    Last edited in OpenGround | gINT | Keynetix > gINT | Keynetix Wiki

  • You could possibly tie the color to the included gINT colors but it'd require some finesse. ;)

    I print in black and white and I rarely print from gINT to pdf. I usually export the graphics to DGN and bring them into Microstation to add strata lines, groundwater, existing grade, proposed grade, etc. 

  • Thanks Allan. 

    That helps.

    One question out of the initial discussion. Does the color field determine the color of your fence  hatch graphics?