Message 1 of 5
Viewport error with linked project

Not applicable
01-20-2017
06:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I'm using the revit API to create some views (floor, ceilling and sections) wand put them on viewsheet with the following code :
dimensionsvue.Clear();
ViewSheet vs; vs = FichesSheets.Sheets(doc, fiche_locaux.nom, fiche_locaux.nomlocal, nbfeuille, Locaux.tx); iddebut = 0; idfin = FichesViews.vuescoupe.Count - 1; Viewport viewport = Viewport.Create(doc, vs.Id, FichesViews.vuescoupe[i].Id, new XYZ(fiche_locaux.PointRef[0].X + largeur / 2, fiche_locaux.PointRef[0].Y - (hauteur / 2), 0)); dimensionsvue.Add(new dimensions( viewport, Math.Abs(viewport.GetBoxOutline().MaximumPoint.X - viewport.GetBoxOutline().MinimumPoint.X), Math.Abs(viewport.GetBoxOutline().MaximumPoint.Y - viewport.GetBoxOutline().MinimumPoint.Y)));
it's working great but if I use linked project it dosn't work anymore. When debuging, it just go until Viewport.create and directly jump to getname.
I don't know why ?
Thanks for your help.
Thibaud