I have a python toolbox with a parameter set up like:
lyrInput = arcpy.Parameter(name = "lyrInput",
displayName="Input Feature Layer",
datatype="GPFeatureLayer", #changed to allow drop-down from open layers
lyrInput.filter.list = ["Polyline"]
When I open the tool in ArcMap 10.5.1, it shows me the layers that have been added to ArcMap:
However, when I open it on our virtual servers using ArcMap 10.7.1, the filter doesn't show any layers added to ArcMap. This means that selections won't be applied:
It's the exact same python script on both versions. But, in 10.7.1, nothing shows. I've tried creating a separate script and setting the filter in the properties and, when no filter is added, it shows me in_memory layers but when I set a filter to the feature layer, it doesn't show anything.
UPDATE: I just noticed that my trying to add the newly created layer to ArcMap is not working. It's giving an error stating, "CreateObject cannot open map document"