AnsweredAssumed Answered

Extracting filename to custom properties

Question asked by Jeremy Harris on Jul 4, 2014
Latest reply on Jul 5, 2014 by Deepak Gupta

I've spent a few hours on this forum trying to learn how to create a Macro to extract from the file name and import the info into the relevant custom properties. I have no knowledge with macros but have tried to pick up some things as I go along so I apologise if this is really basic.


I've succeded in extracting the necessary info into the DWG No. and Description fields.


Only issue I currently have is that for the description, it keeps including the ".SLDPRT" or ".SLDASM"


I've tried a few methods to instruct it to replace it with nothing but I keep getting errors?


On the Macro so far, the description section is:


    If swModel.CustomInfo("DWG No.") = "" Then

      swModel.AddCustomInfo2 "DWG No.", swCustomInfoText, Left(swModel.GetTitle, 11)


        swModel.CustomInfo("DWG No.") = Left(swModel.GetTitle, 11)

    End If


What would I have to do to remove the extension from the new custom properties description?