19 December 2018
I don't think there is any way to do this with APDL commands. A long time back (probably v12.1 or so) the topology optimization commands were part of APDL but were very limited. TOPDEF would define some of the setup, TOPEXE would run a single step of topology optimization, and TOPITER would run a series of topo iterations.
All of the constraints were controlled with a bunch of OP commands (OPADD, OPVAR, OPTYPE, OPFRST, etc). You can find some of the old documentation.
At some point, all of these commands became undocumented and were removed from the APDL GUI interface.
The new Workbench Topo Opt doesn't seem to use any of those commands. When I look at the ds.dat file it appears that all of the topo opt stuff is being handled by an APDL system command:
/SYS,"C:\Program Files\ANSYS Inc\v192\ANSYS\bin\winx64\Opti.exe" 53795 TOPO1
I'm not sure what that Opti.exe command will call but unless it specifically references the APDL commands, there isn't really a way to customize it.