Esempio n. 1
0
 public SwDmDrawing(ISwDmApplication dmApp, ISwDMDocument doc, bool isCreated,
                    Action <ISwDmDocument> createHandler, Action <ISwDmDocument> closeHandler,
                    bool?isReadOnly = null)
     : base(dmApp, doc, isCreated, createHandler, closeHandler, isReadOnly)
 {
     m_SheetsLazy = new Lazy <SwDmSheetCollection>(() => new SwDmSheetCollection(this));
 }
 public SwDmDocument3D(ISwDmApplication dmApp, ISwDMDocument doc, bool isCreated,
                       Action <ISwDmDocument> createHandler, Action <ISwDmDocument> closeHandler,
                       bool?isReadOnly = null)
     : base(dmApp, doc, isCreated, createHandler, closeHandler, isReadOnly)
 {
     m_Configurations = new Lazy <ISwDmConfigurationCollection>(() => new SwDmConfigurationCollection(this));
 }
Esempio n. 3
0
 public SwDmVirtualAssembly(ISwDmApplication dmApp, ISwDMDocument doc, SwDmDocument owner, bool isCreated,
                            Action <ISwDmDocument> createHandler, Action <ISwDmDocument> closeHandler, bool?isReadOnly)
     : base(dmApp, doc, isCreated, createHandler, closeHandler, isReadOnly)
 {
     m_Owner           = owner;
     m_Owner.Disposed += OnOwnerDisposed;
 }
Esempio n. 4
0
        /// <summary>
        /// Gets the custom property.
        /// </summary>
        /// <param name="propertyName">Name of the property.</param>
        /// <param name="swDmDocument">The SolidWorks document manager document.</param>
        /// <param name="configuration">The configuration (the generic custom property will be used if no configuration specified).</param>
        /// <returns>The property value, or null if the property is not found.</returns>
        public static string GetCustomProperty(string propertyName, ISwDMDocument swDmDocument, string configuration = null)
        {
            string             propertyValue;
            SwDmCustomInfoType type;

            if (string.IsNullOrEmpty(configuration))
            {
                // Get the generic (non configuration specific) custom property
                propertyValue = swDmDocument.GetCustomProperty(propertyName, out type);
            }
            else
            {
                // Get the configuration specific custom property
                ISwDMConfiguration swDmConfiguration = swDmDocument.ConfigurationManager.GetConfigurationByName(configuration);
                propertyValue = swDmConfiguration.GetCustomProperty(propertyName, out type);
            }

            return(propertyValue);
        }
Esempio n. 5
0
 public SwDmPart(ISwDmApplication dmApp, ISwDMDocument doc, bool isCreated,
                 Action <ISwDmDocument> createHandler, Action <ISwDmDocument> closeHandler, bool?isReadOnly = null)
     : base(dmApp, doc, isCreated, createHandler, closeHandler, isReadOnly)
 {
 }
Esempio n. 6
0
 internal DocumentWrapper(ISwDMApplication app, ISwDMDocument model)
 {
     m_App        = app;
     m_Model      = model;
     m_IsDisposed = false;
 }