associated sheet set

associated sheet set

Anonymous
適用対象外
327件の閲覧回数
2件の返信
メッセージ1/3

associated sheet set

Anonymous
適用対象外
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 件のいいね
328件の閲覧回数
2件の返信
返信 (2)
メッセージ2/3

Anonymous
適用対象外
well I can return the same information with the SSFOUND system variable, but how do I poll the value of SSFOUND from VBA?
0 件のいいね
メッセージ3/3

Anonymous
適用対象外
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 件のいいね