AnsweredAssumed Answered

Removing .shp from user output/Changing Name

Question asked by Adam.Thompson_ on Oct 9, 2018
Latest reply on Oct 11, 2018 by Dan_Patterson

So I have created a tool that just mimics the Erase Tool but with a basic license, and the only problem I am running into is when the user selects the output as a shapefile, it messes with my file naming that I do with my processes such as intersect or union. The user is given 3 options to enter, inFc, EraseFc, and Outfc

For example;


ERROR 000732: Selecting Features: Dataset D:\PythonDataTest\ERASE_TESTT.shp_Intersect does not exist or is not supported
Failed to execute (SelectLayerByLocation).


As you can see it is trying to append the _Intersect behind the .shp of the output file name the user selected. And this of course wont work later on when my other processes try and find that shapefile.. SO


my question is how do I get the output name + the string im appending to it, to be before .shp and not after it.


Any help is appreciated thank you!