Hi,
Is there any way of creating tags like below using the C# API ?
https://help.autodesk.com/view/NAV/2023/ENU/?guid=GUID-E58E6979-EA8D-4C58-BAA2-2879BD493420
Thanks
Solved! Go to Solution.
Solved by lanneauolivier. Go to Solution.
Hi @igor.barcelosC54YD ,
Please take a look at this below code
Document doc = Autodesk.Navisworks.Api.Application.ActiveDocument;
Autodesk.Navisworks.Api.View view = doc.ActiveView;
string getRedLines = view.GetRedlines();
// The value of "getRedLines" will resemble the value I've set in the "s" variable.
// By adjusting the value of "s", you can customize your own set of red lines.
string s = "{\"Type\":\"RedlineCollection\",\"Version\":1,\"Values\":[{\"Type\":\"RedlineEllipse\",\"Version\":1,\"Thickness\":3,\"Color\":[1,0,0],\"MinPoint\":[-0.45388908606868772,0.3369782608691772],\"MaxPoint\":[0.54593652310359631,-0.2248285099990586]}]}";
view.TrySetRedlines(s);
Hi, thanks a lot for your return.
if I may, I have two more questions :
1/ I could drawn the circle with your code like shown in the image below. The problem is that when I change the camera (scrolling or padding) the ellips dissapears. How can I append this to the current view ?
2/ My final goal is to achieve an similar result as the 'markups' in Forge like below. Any ideas ? Going with the redLines is an good idea ?
Thank you !
You must use RenderPlugin for it. It allows you to draw over the render in 3D or in 2D.
Can't find what you're looking for? Ask the community or share your knowledge.