8 Replies Latest reply on Nov 5, 2014 2:14 AM by Daniel Andersson

    link global variable to custom property via macro

    Daniel Restrepo

      Hello everyone,


      I have succeeded in writing a macro that adds a custom property to my part and I want that property to be linked to a global variable. Now I wrote the follonwing code on the macro using Chr(34) and $PRP: and it is accepted, but the custom property manager does not recognize the text as the variable, just as plain text:


      Set CusPropMgr = swModel.Extension.CustomPropertyManager("")

      CusPropMgr.Add2 "Mass [kg]", swCustomInfoText, ""

      swModel.CustomInfo("Mass [kg]") = "$PRP:" + Chr(34) + "Mass in kg" + Chr(34)


      Any thoughts on what is happening here? Thanks!