Drawing sheet issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All;
I am trying to create the drawing sheet and placing the views in drawing sheet
Starting with my problems:
1. I have to hide the levels which comes in Drawing sheet but unable to find where to do it using C#
I don't know the code for it but I will post below the code which I have done
2. The second problem is the visibility of Title block which I don't want to display
3. And the final problem is the position for placing the views
I have use location.U and location.V but it gives the view at extremen bottom rather then center
Below is my code , please guide me so that I can complete my work, I have used STANDARD Drawing template , I want to change the template but unable to do it
{
var block_type_name = "Standard";
foreach (var block_type in title_blocks)
{
var block_name = block_type.get_Parameter(BuiltInParameter.ALL_MODEL_TYPE_NAME).AsString();
if (block_name == block_type_name)
{
titleblock = block_type;
break;
}
}
var view_name = "{3D}";
Element view_1 = null;
foreach (var v in viewList)
{
var name_v = v.get_Parameter(BuiltInParameter.VIEW_NAME).AsString();
if (name_v == view_name)
{
view_1 = v;
}
if (view_1 != null )
{
var t = new Transaction(doc, "Add Views to Sheet");
t.Start();
var newsheet = ViewSheet.Create(doc, titleblock.Id);
UV location = new UV((newsheet.Outline.Max.U - newsheet.Outline.Min.U) / 2,
(newsheet.Outline.Max.V - newsheet.Outline.Min.V) / 2);
// Create viewports for both views on the sheet
Viewport vp1 = Viewport.Create(doc, newsheet.Id, view_1.Id, new XYZ(location.U,location.V, 0));
vp1.LookupParameter("View Scale").Set(500);
t.Commit();
}
please someone try to provide me the solution , it would be too helpful for me
Thankyou in Advance