associated sheet set

associated sheet set

Anonymous
Not applicable
322 Views
2 Replies
Message 1 of 3

associated sheet set

Anonymous
Not applicable
I can not figure out how to find the associated sheet set for an active drawing. I am creating a VBA reactor to update/change sheet set properties, but I can not figure out how to find the associated sheet set with the file the user is working with.

Although I did find this lisp routine which works, I can not figure out how to 'translate' the 'namedobjdict' dictionary pointer to VBA. Actually most of it.

(defun c:getCurrentSheetSetPath (/ data)
(if
(and
(setq data (dictsearch (namedobjdict) "AcSheetSetData"))
(setq data (member '(3 . "ShSetFileName") data))
(setq data (cdr (assoc 350 data)))
(setq data (entget data))
)
(cdr (assoc 1 data))
)
)


worst case, I imagine its possible to call the above lisp routine from VBA and get the returned value, but that is a very scrappy/temporary solution.

thanks in advance, binaryouth
0 Likes
323 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
well I can return the same information with the SSFOUND system variable, but how do I poll the value of SSFOUND from VBA?
0 Likes
Message 3 of 3

Anonymous
Not applicable
OK sorry to bother you all

here is the code(from autocad example of getvariable):
Sub Example_GetVariable()
' This example finds the current setting of the
' system variable SSFOUND, aka the location
' of the associated sheet set.

Dim sysVarName As String
Dim varData As Variant

sysVarName = "SSFOUND"
varData = ThisDrawing.GetVariable(sysVarName)
MsgBox sysVarName & " = " & varData, , "GetVariable Example"

End Sub

I would recommend this code replace the first portion of most of the snippets from JTB World. The snippets found at JTB only poll for open Sheet Sets, not the related Sheet Set.
0 Likes