9 Replies Latest reply on Jun 20, 2014 3:58 PM by Patrick O'Hern

    Insert value into string

    Shan Lentine

      I have an interesting API question.  In preparation for move to a new PDM system, we have to modify various custom properties of various existing parts so that it is compatible with the new business system.  The modification that has me stumped is what we use for Part Description.  Our part description is automaticallycreated by using the values of existing dimensions.  Our new system requires that we have configuration specific properties, so this is what I have to do.  The custom property for the description is driven by the string I named tDesc.  And this is what the string looks like:


      tDesc = "ANGLE " & """" & "ANGLE-FLANGE1@Sketch1@" & vTitle & """" & " X " _

                                  & """" & "ANGLE-FLANGE2@Sketch1@" & vTitle & """" & " X " & """" & _

                                  "Thickness@Sheet-Metal1@" & vTitle & """" & " L" & _

                                  """" & "ANGLE-LENGTH@Base-Flange1@" & vTitle & """" & " IN"


      What has me stumped is how to insert "@@(configuration name)" into each one of those four dimension values for each configuration of the part.  I could hard code it into the string, but this is just one example of what will probably prove to be dozens of variations of this string.  The thing that will be constant is the fact I want to insert this value after the 2nd, 4th, 6th, and 8th "@" character.


      I know I am probably missing something pretty simple.  Any help would be appreciated.