Message 1 of 2
Create.NewDimension not working as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello guys!
While working with the Revit API & Dimensions, i hit a roadblock,
I am trying to create the same dimension again:
As you can see, left and rightmost dimension references are in a linked model, and the middle 4 references are in this model.
These are their stable representations:
"79b0def4-4c3e-4236-bed1-f5882e1169b7-00ef95e0:0:RVTLINK:628051:0:INSTANCE:627289:14459:INSTANCE:896150:7:6:LINEAR/7"
"05b4b29d-8b32-41be-81a6-b4e76080906b-00a1bbe1:0:LINEAR/1"
"5a542d19-7a69-4dc7-bec8-c48efb3773c9-00ab89f2:0:LINEAR/0"
"5a542d19-7a69-4dc7-bec8-c48efb3773c9-00ab89fa:0:LINEAR/0"
"05b4b29d-8b32-41be-81a6-b4e76080906b-00a1be8a:0:LINEAR/0"
"79b0def4-4c3e-4236-bed1-f5882e1169b7-00ef95e0:0:RVTLINK:628051:0:INSTANCE:627289:14459:INSTANCE:896150:7:6:LINEAR/3"
I use the following code:
using var line = dim.Curve as Line;
doc.Create.NewDimension(dim.View, line, dim.References, dim.DimensionType);
doc.Delete(dim.Id);
What i get is this:
How come this does not work? Hope somebody can help me 🙂
Greetings from Vienna!