コード例 #1
0
        public void CollectDirectories(Dictionary <string, CadManifestObject> CADManifestList,
                                       string projectDir,
                                       string outputDir)
        {
            foreach (var component in ChildComponents.Values)
            {
                string key = component.AVMID + component.RevID + component.VersionID;
                if (!CADManifestList.ContainsKey(key))
                {
                    // If key not found, create one.
                    string modelpath = component.CyPhyModelPath;
                    if (modelpath == "")
                    {
                        modelpath = ".";
                    }
                    CadManifestObject manifestobject = new CadManifestObject();
                    manifestobject.AvmID   = component.AVMID;
                    manifestobject.Version = component.VersionID;

                    string cadfolder    = Path.Combine(projectDir, modelpath, component.ModelURI ?? "");
                    string outputfolder = Path.Combine(outputDir, "abc.xyz");
                    Uri    uricad       = new Uri(cadfolder);
                    Uri    uriout       = new Uri(outputfolder);
                    manifestobject.LocalFolderPath   = Uri.UnescapeDataString(uriout.MakeRelativeUri(uricad).ToString().Replace('/', '\\'));
                    manifestobject.RemoteMETAProPath = Path.Combine(modelpath, component.ModelURI ?? "");
                    manifestobject.RemoteFolderPath  = Path.GetDirectoryName(modelpath);
                    CADManifestList[key]             = manifestobject;
                }
            }

            foreach (var component in ChildSize2FitComponents.Values)
            {
                string key = component.AVMID + component.RevID + component.VersionID;
                if (!CADManifestList.ContainsKey(key))
                {
                }
            }
        }
コード例 #2
0
        public void CollectDirectories(Dictionary<string, CadManifestObject> CADManifestList,
                                                 string projectDir,
                                                 string outputDir)
        {
            foreach (var component in ChildComponents.Values)
            {
                string key = component.AVMID + component.RevID + component.VersionID;
                if (!CADManifestList.ContainsKey(key))
                {
                    // If key not found, create one.
                    string modelpath = component.CyPhyModelPath;
                    if (modelpath == "") modelpath = ".";
                    CadManifestObject manifestobject = new CadManifestObject();
                    manifestobject.AvmID = component.AVMID;
                    manifestobject.Version = component.VersionID;

                    string cadfolder = Path.Combine(projectDir, modelpath, component.ModelURI??"");
                    string outputfolder = Path.Combine(outputDir, "abc.xyz");
                    Uri uricad = new Uri(cadfolder);
                    Uri uriout = new Uri(outputfolder);
                    manifestobject.LocalFolderPath = Uri.UnescapeDataString(uriout.MakeRelativeUri(uricad).ToString().Replace('/', '\\'));
                    manifestobject.RemoteMETAProPath = Path.Combine(modelpath, component.ModelURI ?? "");
                    manifestobject.RemoteFolderPath = Path.GetDirectoryName(modelpath);
                    CADManifestList[key] = manifestobject;
                }
            }

            foreach (var component in ChildSize2FitComponents.Values)
            {
                string key = component.AVMID + component.RevID + component.VersionID;
                if (!CADManifestList.ContainsKey(key))
                {
                }
            }
        }