Thanks Lee, behind the scenes this was provided to Manuel. https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/publish-dsd-file/td-p/1350729
Needs to merge the 2.
(defun c:makedsd (/ file layouts_to_plot NumTabs OldFda )
(setq OldFda (getvar "FILEDIA"))
(setvar "FILEDIA" 0)
;;;(setq layouts_to_plot (dos_multilist "Create Multi-sheet DWF file" "Select drawings" (layoutlist)))
(setq NumTabs (length layouts_to_plot));Number of tabs selected
(setq pathtxt (strcat (getvar "dwgprefix") "newfile.dsd"))
(setq file (open (strcat (getvar "dwgprefix") "newfile.dsd") "w"))
(write-line "[DWF6Version]" file)
(write-line "Ver=1" file)
(write-line "[DWF6MinorVersion]" file)
(write-line "MinorVer=1" file)
(write-line (strcat "[DWF6Sheet:"(substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4))"-" (getvar "ctab") "]")file)
(write-line (strcat "DWG=" (getvar "dwgprefix")(substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4)) ".dwg")file)
(write-line (strcat "Layout=" (getvar "ctab") )file)
(write-line (strcat "Setup=" )file)
(write-line (strcat "OriginalSheetPath=" (strcat(getvar "dwgprefix")(substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4))".dwg") )file)
(write-line (strcat "Has Plot Port=1" )file)
(write-line (strcat "[Target]") file)
(write-line (strcat "Type=1" ) file)
(write-line (strcat "DWF=" (strcat(getvar "dwgprefix")(substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4))".dwf") )file)
(write-line (strcat "OUT="(strcat(getvar "dwgprefix") )) file)
(write-line (strcat "PWD=" )file)
(close file)
(command "_.delay" 2000)
(command "-Publish" pathtxt )
(setvar "FILEDIA" OldFda)
(startapp "explorer /e," (getvar "dwgprefix"))
(princ)
);defun