Esempio n. 1
0
    /// <summary>
    /// Create a new component variant.
    /// </summary>
    /// <param name="Dest">Component to create variant for.</param>
    /// <param name="Source">Parameter data.</param>
    /// <param name="RefDes">Refdes of component being modified.</param>
    void CreateCompVar(ref IComponentVariation Dest, VarParam <string, string> Source, string RefDes = "")
    {
        IParameterVariation tmpParam;

        if (RefDes != "")
        {
            Dest.DM_SetPhysicalDesignator(RefDes); //Set refdes
        }
        foreach (string key in Source.Keys)        //Set each parameter
        {
            tmpParam = Dest.DM_AddParameterVariation();
            tmpParam.DM_SetParameterName(key);
            tmpParam.DM_SetVariedValue(Source[key] + "_$");
        }
    }
Esempio n. 2
0
 /// <summary>
 /// Create a new component variant.
 /// </summary>
 /// <param name="Dest">Component to create variant for.</param>
 /// <param name="Source">Parameter data.</param>
 /// <param name="RefDes">Refdes of component being modified.</param>
 void CreateCompVar(ref IComponentVariation Dest, VarParam <string, string> Source, string RefDes)
 {
     try
     {
         IParameterVariation tmpParam;
         Dest.DM_SetPhysicalDesignator(RefDes);
         foreach (string key in Source.Keys)
         {
             tmpParam = Dest.DM_AddParameterVariation();
             tmpParam.DM_SetParameterName(key);
             tmpParam.DM_SetVariedValue(Source[key] + "_$");
         }
     }
     catch (Exception ex)
     {
         ErrorMail.LogError("Error in " + System.Reflection.MethodBase.GetCurrentMethod().Name + ".", ex);
         return;
     }
 }