8 Replies Latest reply on Mar 20, 2017 4:52 PM by user19752

    Substitute * for a glyph of star or SVG?

    lindseym

      Is it possible to substitute an asterisk for a glyph of a star, or SVG?

       

      (or a word/ string of words with a glyph)

       

       

      And if it is, how would I go about doing it?

       

      Thanks,

       

      -L

        • 1. Re: Substitute * for a glyph of star or SVG?
          mikebeargie

          Where do you want to substitute it?

           

          In text objects and field content you need to use text only, but you can use unicode characters as well like these ones:

          Unicode characters table

           

          In a webviewer, you can use a combination of HTML, text, images (including SVG) all together.

           

          On a layout, you can place images and text as separate objects.

           

          You can also store html code and svg code in a text field, but it has to be displayed through a web viewer to render correctly.

          1 of 1 people found this helpful
          • 2. Re: Substitute * for a glyph of star or SVG?
            lindseym

            I want to do a substitute in a text field.

             

             

            I am able to get the substitute to read

             

            *Level From Space

             

            but what I want is:

             

            ★Level From Space

             

             

             

             

             

             

             

            I found the appropriate symbol:

             

            Screen Shot 2017-03-20 at 1.31.51 PM.png

             

             

            Not now need to know how to put it in my calculation for the substitution.

             

            I looked up an option.. it did not give me the results I wanted.. I tried " Code (text) "

             

            Here is my substitution calculation

             

            Screen Shot 2017-03-20 at 1.35.57 PM.png  OR

             

            Let ( [

              t = LeftWords ( Location Calculation ; 1 ) ;

              x = Filter ( LeftWords ( t ; 1 ) ; "0123456789" )  = LeftWords ( t ; 1 ) ;

              l = Length ( LeftWords ( t ; 1 ) ) ;

              n = GetAsNumber ( LeftWords ( t ; 1 ) ) ;

             

              locationCalculationWithoutLeadingZeroes =

                Case (

                  x ;

                  n & Right ( t ; Length ( t ) - l ) ;

                  t

                )

              ] ;

             

              // And the second: (substitutes)

             

            Substitute (

                ${Copy Side A} ;

                  [ "XLEVEL#" ; THIS IS WHERE I WANT THE STAR & Level from Space ] ;

                  [ "XL#" ; Exiting Level ] ;

                  [ "UPX/DNX" ; Exit What Level ] ;

                  [ "LEVELRANGE" ; Level Range ] ;

                  [ "LEVEL#" ; Level from Space ] ;

                  [ "STAIR#" ; Stair# ] ;

                  [ "BLDG#" ; Building from Space ] ;

                  [ "TBD/ROOF/ACCESS" ; Roof Access ] ;

                  [ "LOC#" ; locationCalculationWithoutLeadingZeroes ] ;

                  // This is the substitution that would need the leading zeros removed

                  [ ";" ; "¶" ] ;

                  [ "TBD" ; TextStyleAdd ( "TBD" ; HighlightYellow ) ] )

              )

            • 3. Re: Substitute * for a glyph of star or SVG?
              mikebeargie

              There is a Unicode star:

              http://www.fileformat.info/info/unicode/char/2605/index.htm

               

              so just copy and paste it from that page (or here if this works: ★ )

               

              and put that in the calculation engine in place of your asterisk.

              1 of 1 people found this helpful
              • 4. Re: Substitute * for a glyph of star or SVG?
                mikebeargie

                It's text, so you can treat it as text in a regular string like this:

                 

                [ "XLEVEL#" ; "" & Level from Space ] ;

                 

                see attached proving this works in my data viewer.

                1 of 1 people found this helpful
                • 5. Re: Substitute * for a glyph of star or SVG?
                  lindseym

                  Oh Cool! I thought I had to do some kind of code. This worked out great! Thanks!

                   

                   

                  Screen Shot 2017-03-20 at 1.46.55 PM.png

                   

                   

                   

                  Screen Shot 2017-03-20 at 1.47.09 PM.png

                   

                  Looking like a rock star! Thank you kindly!

                   

                  -Lindsey

                  • 6. Re: Substitute * for a glyph of star or SVG?
                    user19752

                    If you want to use code,

                    Char(9733)

                     

                    2 of 2 people found this helpful
                    • 7. Re: Substitute * for a glyph of star or SVG?
                      lindseym

                      So to confirm if I wanted to use code.... the number I would enter into the code would be considered the UTF-16 (decimal) number?

                       

                      Even if it was listed on the link Mike gave me, I wouldn't have known what to do with it.

                       

                      So taking the (U+2605) and doing a search for the UTF-16 got me to a place that had the conversion.

                       

                      Thank you

                       

                       

                       

                       

                       

                      • 8. Re: Substitute * for a glyph of star or SVG?
                        user19752

                        Yes, you can confirm it with Code(character)

                         

                        Your screenshot shows it as "HTML code".

                         

                        U+2605 is hexadecimal number, so you can convert it using "calculator" Windows applet or something like it.

                        2 of 2 people found this helpful