Synoptic View Attributes

View attribute for the Synoptic View. This attribute is only available for View.SetAttributeValue (View.GetAttributeValue is not supported).

Attribute Name | Description | Supports
path | Sets the full path and name of the HTML synoptic page to use. Possible Values: • <filepath>,<objectpath> The location of the HTML to use in the Synoptic View and the object to which the synoptic property applies. | • Set

| See View Attributes for a complete list of types of attributes that you can use when customizing your Relational Views.

Python Example: Setting the Synoptic View Attributes

    # Set up a few basics
    from win32com.client import constants as c
    import os.path
    app = Application
    false = 0
    true = 1
    null = None

    # Convenience function to create a simple synoptic page on disk
    def MakeSynViewPages() :
       mysynviewpath = XSIUtils.BuildPath(
           app.InstallationPath(c.siFactoryPath),
           "Data", "XSI_SAMPLES", "Synoptic"
       )
       file1 = XSIUtils.BuildPath(mysynviewpath, "SynViewStartWith.htm")
       file2 = XSIUtils.BuildPath(mysynviewpath, "SynViewSwitchTo.htm")

       f = open(file1, 'w')
       f.write("<html>\n<body version=\"2\">\n<script language=\"VBScript\">\n\n")
       f.write("sub hotspot(in_obj,in_mousebutton,in_keymodifier)\nset self = GetValue(i")
       f.write("n_obj)\nApplication.LogMessage \"VB: Touched \" & self.FullName & \" at \" _")
       f.write("\n\t& self.posx.Value & \",\" & self.posy.Value _\n\t& \",\" & self.posz")
       f.write(".Value & \" (x,y,z)\"\nend sub\n</SCRIPT>\n\n<map name=\"SynopticMap\">\n")
       f.write("<area shape=\"circle\" coords=\"260,251,129\" title=\"\" NOHREF onClick=")
       f.write("\"hotspot\">\n</map>\n\n<img src=\"..\\pictures\\xsilogo.jpg\" usemap=\"#S")
       f.write("ynopticMap\">\n\n</body>\n</html>")

       f = open(file2, 'w')
       f.write("<html>\n<body version=\"2\">\n<script language=\"JavaScript\">\n")
       f.write("\nfunction hotspot(in_obj,in_mousebutton,in_keymodifier)\n{\nvar self = G")
       f.write("etValue(in_obj);\nApplication.LogMessage( \"JS: Touched \" + self.FullName + ")
       f.write("\" at \" \n\t+ self.posx.Value + \",\" + self.posy.Value \n\t+ \",\" + ")
       f.write("self.posz.Value + \" (x,y,z)\" );\n}\n</SCRIPT>\n\n<map name=\"SynopticMap")
       f.write("\">\n<area shape=\"circle\" coords=\"260,251,129\" title=\"\" NOHREF onCli")
       f.write("ck=\"hotspot\">\n</map>\n\n<img src=\"..\\pictures\\xsilogo.jpg\" usemap=")
       f.write("\"#SynopticMap\">\n\n</body>\n</html>")

       return [file1, file2]

    # Create a synoptic property and attach it to a torus
    app.NewScene("", false)
    torus = app.CreatePrim("Torus", "MeshSurface")
    app.Rotate(torus, 90, 0, 0, c.siAbsolute, c.siPivot, c.siObj, c.siX)
    app.Translate(torus, 4, 3, 2, c.siAbsolute, c.siPivot, c.siObj, c.siZ)

    synfiles = MakeSynViewPages()
    applied = torus.AddProperty("Synoptic Property")
    applied.Parameters(1).Value = "SynViewAttrib"
    applied.Parameters(2).Value = synfiles[0]
    app.OpenAttachments()

    # Open the Synoptic viewer
    lay = app.Desktop.ActiveLayout
    vw = lay.Views("Synoptic View")
    vw.SetAttributeValue("path", synfiles[1]+","+torus.Name)

Autodesk Softimage v7.5