Esempio n. 1
0
        public void oneToOne(object a, object b)
        {
            var ListA = (System.Collections.IList)a;
            var ListB = (System.Collections.IList)b;

            Document doc = Autodesk.Navisworks.Api.Application.ActiveDocument;

            Autodesk.Navisworks.Api.DocumentParts.DocumentSavedViewpoints documentSavedViewpoints =
                doc.SavedViewpoints;
            if (ListB.Count == ListA.Count)

            {
                for (int i = 0; i < ListA.Count; i++)
                {
                    try
                    {
                        var    objA = ListA[i];
                        string objB = ListB[i].ToString();
                        Guid   guid = new Guid(objA.ToString().Replace("\"", ""));
                        documentSavedViewpoints.EditDisplayName(documentSavedViewpoints.ResolveGuid(guid), objB.Replace("\"", ""));
                    }
                    catch { }
                }
            }
        }
Esempio n. 2
0
        public void manyToOne(object a, string Parameter)
        {
            var      ListA = (System.Collections.IList)a;
            Document doc   = Autodesk.Navisworks.Api.Application.ActiveDocument;



            Autodesk.Navisworks.Api.DocumentParts.DocumentSavedViewpoints documentSavedViewpoints =
                doc.SavedViewpoints;

            foreach (var objA in ListA)
            {
                Guid guid = new Guid(objA.ToString().Replace("\"", ""));
                documentSavedViewpoints.EditDisplayName(documentSavedViewpoints.ResolveGuid(guid), Parameter.Replace("\"", ""));
            }
        }
Esempio n. 3
0
        private void ManyToSome(object a, object b)
        {
            var ListA = (System.Collections.ArrayList)a;
            var ListB = (System.Collections.ArrayList)b;

            Document doc = Autodesk.Navisworks.Api.Application.ActiveDocument;

            Autodesk.Navisworks.Api.DocumentParts.DocumentSavedViewpoints documentSavedViewpoints =
                doc.SavedViewpoints;

            for (int i = 0; i < ListA.Count; i++)
            {
                var    objA = ListA[i];
                string objB = ListB[0].ToString();
                Guid   guid = new Guid(objA.ToString().Replace("\"", ""));
                documentSavedViewpoints.EditDisplayName(documentSavedViewpoints.ResolveGuid(guid), objB.Replace("\"", ""));
            }
        }