I'm trying to run the tool "Generate Points Along Lines" like this:

arcpy.GeneratePointsAlongLines(inputFeature,r"in_memory\temp","DISTANCE","100 meters")

when setting the output as "in_memory", an error occurs:

000840 the value is not a workspace.

but when I'm running it from the Toolbox it works fine.

Any ideas on what I'm doing wrong or how to make it run using ArcPy?

  • 2
    Works when i try it with (obs +_mangement): arcpy.GeneratePointsAlongLines_management("Lines123",r"in_memory\temp","DISTANCE","100 meters"). How do you define inputFeature? Have you tried rebooting?
    – BERA
    Nov 12, 2018 at 14:03
  • 2
    @BERA you should migrate that to answer as I think you hit the nail on the head. Also to compliment this suggest @segev look at the code sample of ANY tool in the help file and they will see that any tool called using arcpy is always references arcpy.toolname_toolboxalias(...).
    – Hornbydd
    Nov 12, 2018 at 14:34

1 Answer 1


I belive you need to add _management to the name of the tool. For example:

arcpy.GeneratePointsAlongLines_management("Lines123",r"in_memory\temp","DISTANCE","100 meters")

This is working for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.