ILayout Interface Reference

An acad layout wrapper interface. More...

List of all members.


IDocument Document
ILayoutsCollection Layouts
 Layouts collection, parent.
IElement Element
 Layout element, that is AcDbLayout acad object wrapper.
string Name
 Layout name.

Detailed Description

An acad layout wrapper interface.

It wraps Autodesk.AutoCAD.Interop.Common.AcadLayout class. It has a key - ObjectId of its acad layout object. It allows an arbitrary set of named persisent properties to be associated with it.

This example shows how to attach a named property to a layout.

            using Acmx.Acad.Connectivity.Public.Interfaces.ApplicationModel;
            using Acmx.Acad.Connectivity.Public.Classes.ApplicationModel;
            using Autodesk.AutoCAD.Runtime;
                using Adb = Autodesk.AutoCAD.DatabaseServices; 
---declaring a serializable class
            public class CustomLayuotProperty
                        public string s;
                        public int[] i =new int[]{0,1,2,3};
                        public static CustomLayuotProperty DefaultValue
                                        return new CustomLayuotProperty();
---setting and getting the instance of the class as an acad layer property
            public class A
                        [CommandMethodAttribute("ACMX_TESTS", "LTPROP", CommandFlags.Transparent)]
                        public static void Mmm()
                                IApplication iapp =ApplicationProvider.Instance.Get();
                                IDocument idoc =iapp.Documents.ActiveDocument;
                                ILayout ilt =idoc.Layouts.ActiveLayout;
                                string PROP_NAME ="jjj";
                                CustomLayuotProperty prop =new CustomLayuotProperty();
                                prop.s ="xbz";
---setting a layout property in a transaction
                                using (Adb.Transaction ta = idoc.TransactionManager.StartTransaction())
                                        ilt.SetProperty(PROP_NAME, prop);
---prop1 will be filled with the stored property or if any error with CustomLayuotProperty.DefaultValue.
                                CustomLayuotProperty prop1 = (CustomLayuotProperty)ilt.GetProperty(PROP_NAME, CustomLayuotProperty.DefaultValue);

Property Documentation

IDocument Document [get]


ILayoutsCollection Layouts [get]

Layouts collection, parent.

IElement Element [get]

Layout element, that is AcDbLayout acad object wrapper.

string Name [get]

Layout name.

Generated on Sun May 28 08:56:23 2006 for Acmx.AcadConnectivity documentation by  doxygen 1.4.5