I have a model which creates topology with rules and validate itself. But I got used to working with layers in TOC and have a script in Calculate value tool that with a help of Parse path tool make a string output with feature dataset path in. Here is a script:
def GetPath(lyr):
import os
mxd=arcpy.mapping.MapDocument("CURRENT")
target=arcpy.mapping.ListLayers(mxd,lyr)[0]
return target.dataSource
And here is a part of model I want to be working.
Unfortunately, Create topology tool requires path not to some output value or variable, but probably direct file path. That is a reason for crashing of model due to the non-existance of dataset parameter.
Anyway is it possible to make an Input Feature dataset as a variable which records a path from string data? In my case it should be like %FDS%.