Esempio n. 1
0
 public void InitFromFiles()
 {
     // MessageBox.Show("initFromFiles");
     this.ReadSharedParametersFile();
     SupplementalDataFileObj = new ClassFileSupplemental(this);
     Ptr2Debug.AddToDebug("Starting Sort");
     this.SortAllAssociationsList();
     Ptr2Debug.AddToDebug("Done Sorting");
 }
Esempio n. 2
0
        public void AddOneSupplementalDataParameter(List <string> onesupplementalDataArray)
        {
            string fileParamName = "";
            string fileGroupParameterUnderEnumStr = "pg_graphics";
            bool   fileIsInstance = true;
            string fileComment    = "";
            BuiltInParameterGroup thisGroupParmeterUnderAsEnum = BuiltInParameterGroup.INVALID;

            try
            {
                if ((onesupplementalDataArray.Count > 0))
                {
                    fileParamName = onesupplementalDataArray[0];
                    if ((onesupplementalDataArray.Count > 1))
                    {
                        fileGroupParameterUnderEnumStr = onesupplementalDataArray[1].ToString().ToUpper();
                        if ((onesupplementalDataArray.Count > 2))
                        {
                            fileIsInstance = onesupplementalDataArray[2].Equals("todo");
                            if ((onesupplementalDataArray.Count > 3))
                            {
                                fileComment = onesupplementalDataArray[3];
                            }
                        }
                    }
                }

                // addToDebug("adding supplemental fileParamName: " & fileParamName)
                // addToDebug("adding supplemental fileGroupParameterUnderEnumStr: " & fileGroupParameterUnderEnumStr)
                // addToDebug("adding supplemental fileIsInstance: " & fileIsInstance)
                // now we need to see if we can covert a string for the group into an enum
                Enum.Parse(typeof(BuiltInParameterGroup), fileGroupParameterUnderEnumStr, true);
                // addToDebug("thisGroupParmeterUnderAsEnum: " & thisGroupParmeterUnderAsEnum.ToString())
                foreach (ClassOneParamAssociation oneParamAsso in AllAssociationArrayList)
                {
                    //  addToDebug("compare: " & oneParamAsso.thisParameterName.ToLower() & " <-> " & fileParamName.ToLower())
                    if ((oneParamAsso.ThisParameterName.ToLower() == fileParamName.ToLower()))
                    {
                        Ptr2Debug.AddToDebug("supplemental match found");
                        oneParamAsso.addSupplementData(thisGroupParmeterUnderAsEnum, fileIsInstance, fileComment);
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                Ptr2Debug.AddToDebug(ex.ToString());
            }
        }
Esempio n. 3
0
        public ParameterJerkerHubCentral(RevitStuff revitInterface, ClassDebug ptr2Debug)
        {
            this.RevitInterface = revitInterface;

            // , Optional overrideSharedParametersFileNameLong As String = Nothing)
            //   MessageBox.Show(overrideSharedParametersFileNameLong)
            // MessageBox.Show(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location()))
            this.Ptr2Form                     = new FormParameterJerk(this);
            this.Ptr2Debug                    = ptr2Debug;
            AllAssociationArrayList           = new List <ClassOneParamAssociation>();
            AllParamterGroupsList             = new List <ClassOneParamGroup>();
            AllResultsList                    = new List <ClassOneImportResult>();
            AllParametersSelectedToBeInserted = new List <ClassOneParamAssociation>();


            AllSetsObj = new ClassallSetsObj(this);
            Ptr2Debug.AddToDebug(CurrentVersionNumber);


            SharedParametersFileObj = new ClassSharedParametersFile(this);


            // , overrideSharedParametersFileNameLong)
            StageSetupstageOkForJerking = true;
            if ((Flags.StageOkForJerking == false))
            {
                StageSetupstageOkForJerking = false;
            }

            if (StageSetupstageOkForJerking)
            {
                this.CheckVersion();
            }

            // debugShowOptions()
        }