2 Replies Latest reply on Sep 7, 2018 8:21 AM by Robert H.

    In drawing, Separate a Custom property into two

    Renpeng Zou



      I am using SW2017. I had a property mapped from Teamcenter. It is the revision ID, its value is 01.0001.


      Now in the drawing, in the title block, we want to separate it into two area. So in the Revision cell, it will hold 01. In the Baseline cell, it will hold 0001.


      In other CAD, I can use expression or formula to extract 01.0001 into 01 and 0001 and put it on drawing sheet. Looking at Equation in SolidWorks, I found it is not active in Drawing!! Only active in part and assembly. (Did I miss some settings I should turn on? Went through Options, no luck)


      I found several posts that suggests create a global variable in part, add equation to it, create a dummy property, Then in the drawing, I can put it. That is something I am not able to do when the Teamcenter steps in..


      This figure explains my goal, hope you can understand.

      Is there something that can help me achieve my goal here?


      Really appreciate any replies!!!

        • Re: In drawing, Separate a Custom property into two
          Glenn Schroeder

          Someone else may have a better idea, but I believe you have two choices:  separate the one property in Teamcenter into two (and I'll admit I don't know what Teamcenter is, so of course I don't know if that's possible), or get someone to write a macro that would take that property and separate it into two in the Drawing.  If you want to try that then you might want to move this Discussion to the API section of the forum (there's no need to start a new one; there should be a link that says "Move" near the top right of this one).

          • Re: In drawing, Separate a Custom property into two
            Robert H.

            you can use the InStrRev()  & inStr() functions  to get the forward and back of the dot - replace the cad files with .


            look up the function its very usefully tool



            (swDraw.GetPathName, InStrRev(swDraw.GetPathName, "CAD FILES") - 1)