Prod.: Engine, ver.: 6, ID: 60001478, HowTo : Show the layers dialog of an XRef

HowTo : Show the layers dialog of an XRef

Article60001478
TypeHowTo
ProductEngine
Version6
Date Added8/26/2011
Submitted byChristian Holbrook
Keywords

Subject

Show the layers dialog of an XRef

Summary

How can I show the layer dialog of an XRef file ? If there isn't such an option can you add this feature ?

Solution

This is already added in our components. You can call the layer manager and show it passing the vdBlock ExternalReference which is the document of the Xref file. This way the Layer dialog will show the layers fo the specific XREF. See the code :
            VectorDraw.Professional.vdObjects.vdDocument doc = vdFramedControl1.BaseControl.ActiveDocument;
            doc.New();
            doc.Open(@"C:\test\1.vdml"); // this drawing has a file as XREF named “VectorDraw-2000.VDML”
            VectorDraw.Professional.Dialogs.LayersDialog.Show(vdFramedControl1.BaseControl.ActiveDocument); // layers dialog of the "master document"
            VectorDraw.Professional.Dialogs.LayersDialog.Show(doc.Blocks.FindName("VectorDraw-2000").ExternalReference);// layers dialog of the XRef file VectorDraw-2000.VDML