> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class MFileGen

Namespace: [VM.Managed.DAFUL.CoSim.Matlab](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.CoSim.Matlab)\
Assembly: VMDCoSimMatlab.dll

The M file generation setting class

```csharp theme={null}
public class MFileGen : FileGen, IObservableObject, IDisposableObject, ILinkable, IObjectBase, IObject, ILinkContainer, IOwned, IHasID, IEventProvider, IHasKeyObject, ILinkContainerEvent, IVerifiable, IHistoryObjectSerializable, IAttributeContainer, INamed, IEnabled, INavigatorItem
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
ObservableObject ←
LinkableBase ←
ObjectBase ←
Object\<ObjectEventCore> ←
CoSimBase ←
CoSimSettingsBase ←
FileGen ←
[MFileGen](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.CoSim.Matlab.MFileGen.md)

#### Implements

IObservableObject,
IDisposableObject,
ILinkable,
IObjectBase,
IObject,
ILinkContainer,
IOwned,
IHasID,
IEventProvider,
IHasKeyObject,
ILinkContainerEvent,
IVerifiable,
IHistoryObjectSerializable,
IAttributeContainer,
INamed,
IEnabled,
INavigatorItem

#### Inherited Members

FileGen.Initialize(Unit.ConvertFactor),
FileGen.OnDeserialization(object),
FileGen.Get\_MessageLevel(),
FileGen.FilePath,
FileGen.FMIVersion,
FileGen.Description,
FileGen.MessageLevel,
FileGen.ScaleFactor,
CoSimSettingsBase.Initialize(Unit.ConvertFactor),
CoSimSettingsBase.OnDeserialization(object),
CoSimSettingsBase.Use,
CoSimSettingsBase.ExecutingProgramPath,
CoSimSettingsBase.InterfaceProgramType,
CoSimSettingsBase.\_InterfaceTimeStep,
CoSimSettingsBase.\_IOList,
CoSimBase.GetModelNavigatorInformationImpl(XmlDocument, XmlElement, bool),
CoSimBase.FixUp(ObjectBase),
CoSimBase.SetOldNameWithNewEntity(ObjectBase, ObjectBase),
CoSimBase.FullName,
CoSimBase.Name,
CoSimBase.NonSymmetricName,
CoSimBase.IsEnabled,
CoSimBase.Comment,
Object\<ObjectEventCore>.GetKey(),
Object\<ObjectEventCore>.Initialize(Unit.ConvertFactor),
Object\<ObjectEventCore>.SetIconColor(Canvas),
Object\<ObjectEventCore>.OnDeserialization(object),
Object\<ObjectEventCore>.CustomGetObjectData(SerializationInfo, StreamingContext),
Object\<ObjectEventCore>.RollbackEvent(),
Object\<ObjectEventCore>.OnDeserializedCore(object),
Object\<ObjectEventCore>.Key,
Object\<ObjectEventCore>.UntypedEventCore,
Object\<ObjectEventCore>.EventCore,
Object\<ObjectEventCore>.Attributes,
ObjectBase.ReplaceEventCore(ObjectEventCore),
ObjectBase.SetModifiedCore(ModifiedResult.ModifiedType),
ObjectBase.AddPostDeserialize(StreamingContext),
ObjectBase.LinkAddedToDocumentCore(IOwned, bool),
ObjectBase.SetModified(ModifiedResult.ModifiedType),
ObjectBase.SetModified(),
ObjectBase.SetModified(ModifiedResult.ModifiedType, IDocument),
ObjectBase.DestroyObject(object, LinkEventArgs),
ObjectBase.DestroyObject(DestroyEventArgs),
ObjectBase.DestroyObject(),
ObjectBase.Initialize(Unit.ConvertFactor),
ObjectBase.FixUp(ObjectBase),
ObjectBase.DoWorkAfterUpdateContents(),
ObjectBase.SetOldNameWithNewEntity(ObjectBase, ObjectBase),
ObjectBase.SetIconColor(Canvas),
ObjectBase.RemoveFromCreatedList(),
ObjectBase.PostAddToDocument(),
ObjectBase.PostRemoveFromDocument(Document),
ObjectBase.GetArgumentList(LinkedList\<ObjectBase>),
ObjectBase.ResetInvalidEntity(),
ObjectBase.OnDeserialization(object),
ObjectBase.IsSerializableEvent(Delegate),
ObjectBase.CustomGetObjectData(SerializationInfo, StreamingContext),
ObjectBase.CheckAndUpdateLink(HashSet\<ObjectBase>),
ObjectBase.Verify(VerifiedResult),
ObjectBase.ConnectProxy(),
ObjectBase.RollbackEvent(),
ObjectBase.LinkRequestUpdating(object, LinkEventArgs),
ObjectBase.LinkRequestUpdate(object, LinkEventArgs),
ObjectBase.LinkRequestDestroying(object, LinkEventArgs),
ObjectBase.LinkRequestDestroy(object, LinkEventArgs),
ObjectBase.LinkAddedToDocument(object, AddToDocEventArgs),
ObjectBase.LinkRemovedFromDocument(object, RemoveFromDocEventArgs),
ObjectBase.DisposeManagedResources(),
ObjectBase.GetDestroyEventExtraData(),
ObjectBase.OnLinkReserved(ILink, object, EventArgs),
ObjectBase.CreateEntityWhenUpdateContents(Action),
ObjectBase.GetObjectByKey(UIntPtr),
ObjectBase.FindObjectOnXmlDeserialize(string),
ObjectBase.UpdateContents(XmlReader, ObjectBase, string),
ObjectBase.UpdateContents(XmlReader, ObjectBase),
ObjectBase.UpdateContents(string, string),
ObjectBase.UpdateContents(string),
ObjectBase.SetFlagWhenXMLFile(string, bool),
ObjectBase.IsEqualArray\<T>(T\[], T\[]),
ObjectBase.IsEqualList(List\<double>, List\<double>),
ObjectBase.SetContainer(IOwned, bool),
ObjectBase.GetTargetListForUpdate(),
ObjectBase.SkipUpdateObjectImpl(),
ObjectBase.raise\_OnUpdating(object, LinkEventArgs),
ObjectBase.raise\_OnUpdate(object, LinkEventArgs),
ObjectBase.raise\_OnDestroying(object, LinkEventArgs),
ObjectBase.raise\_OnDestroy(object, LinkEventArgs),
ObjectBase.raise\_Destroying(object, Identifier),
ObjectBase.raise\_OnAdded(object, AddToDocEventArgs),
ObjectBase.raise\_OnRemoved(object, RemoveFromDocEventArgs),
ObjectBase.raise\_OnContentsUpdated(object, EventArgs),
ObjectBase.Dispose(bool),
ObjectBase.SkipModified,
ObjectBase.ClearChildInfoBeforeDeserialize,
ObjectBase.KeyImpl,
ObjectBase.ID,
ObjectBase.TopologyEntityTypeName,
ObjectBase.ObjectStateForCircularError,
ObjectBase.ObjectState,
ObjectBase.IsChildExternable,
ObjectBase.IsExternable,
ObjectBase.Container,
ObjectBase.Owner,
ObjectBase.Document,
ObjectBase.UntypedEventCore,
ObjectBase.KernelKey,
ObjectBase.Key,
ObjectBase.OnContentsUpdated,
ObjectBase.OnRemoved,
ObjectBase.OnAdded,
ObjectBase.Destroying,
ObjectBase.OnDestroy,
ObjectBase.OnDestroying,
ObjectBase.OnUpdate,
ObjectBase.OnUpdating,
LinkableBase.OnDeserialization(object),
ObservableObject.Dispose(),
ObservableObject.RaisePropertyChanged(string),
ObservableObject.RaisePropertyChanged(string, object, object),
ObservableObject.Dispose(bool),
ObservableObject.DisposeManagedResources(),
ObservableObject.DisposeUnmanagedResources(),
ObservableObject.IsDisposed,
ObservableObject.TryDisposing,
ObservableObject.Disposed,
ObservableObject.Disposing,
ObservableObject.PropertyChanged

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkedObjects\<T>(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### MFileGen()

Initializes a new instance of the [MFileGen](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.CoSim.Matlab.MFileGen.md) class.

```csharp theme={null}
public MFileGen()
```

### MFileGen(string)

Initializes a new instance of the [MFileGen](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.CoSim.Matlab.MFileGen.md) class.

```csharp theme={null}
public MFileGen(string strName)
```

#### Parameters

`strName` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name of the [MFileGen](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.CoSim.Matlab.MFileGen.md) class.

## Properties

### IOList

Obsolete

```csharp theme={null}
[Obsolete]
public CoSimIOList IOList { get; set; }
```

#### Property Value

CoSimIOList

### InterfaceProgramType

Gets the type of the interface program.

```csharp theme={null}
public override InterfaceType InterfaceProgramType { get; set; }
```

#### Property Value

InterfaceType

### InterfaceTimeStep

Obsolete

```csharp theme={null}
[Obsolete]
public Variable InterfaceTimeStep { get; set; }
```

#### Property Value

Variable

### MFileName

Gets or sets the name of the M file.

```csharp theme={null}
public string MFileName { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### SimulinkFileName

Gets or sets the name of the simulink file.

```csharp theme={null}
public string SimulinkFileName { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

## Methods

### Initialize(ConvertFactor)

Initializes member through unit convert factor.

```csharp theme={null}
public override void Initialize(Unit.ConvertFactor factor)
```

#### Parameters

`factor` Unit.ConvertFactor

The unit convert factor.

### LinkRequestUpdate(object, LinkEventArgs)

Request for update the linked object.

```csharp theme={null}
protected override void LinkRequestUpdate(object objNotifier, LinkEventArgs arg)
```

#### Parameters

`objNotifier` [object](https://learn.microsoft.com/dotnet/api/system.object)

The linked object.

`arg` LinkEventArgs

The [LinkEventArgs](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.LinkEventArgs.md) instance containing the event data.

### OnDeserialization(object)

Called when \[deserialization].

```csharp theme={null}
protected override void OnDeserialization(object sender)
```

#### Parameters

`sender` [object](https://learn.microsoft.com/dotnet/api/system.object)

The sender.

### SetMFileName(string)

Set M file name.

```csharp theme={null}
public void SetMFileName(string strName)
```

#### Parameters

`strName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The M file name.

### SetSimulinkFileName(string)

Set simulink file name.

```csharp theme={null}
public void SetSimulinkFileName(string strName)
```

#### Parameters

`strName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The simulink file name.
