Hello, I'm trying to use ilogic to create a sheet format but I want to enable the option of FitViewsToSheet.
Does anyone know how to accomplish this?
Solved! Go to Solution.
Hello, I'm trying to use ilogic to create a sheet format but I want to enable the option of FitViewsToSheet.
Does anyone know how to accomplish this?
Solved! Go to Solution.
Solved by Andrii_Humeniuk. Go to Solution.
Hi @drafter2ZT9Z4 . You need to use the AddWithOptions method and add the FitViewsToSheet setting to it. Example code:
Dim oDDoc As DrawingDocument = TryCast(ThisDoc.Document, DrawingDocument)
If oDDoc Is Nothing Then Exit Sub
Dim oOptions As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap
Call oOptions.Add("FitViewsToSheet", True)
Dim oSheetF As SheetFormat = oDDoc.SheetFormats.AddWithOptions(oDDoc.ActiveSheet, "NewSheetFormat", oOptions)
Valid values are: Name = “FitViewsToSheet”, Value = Boolean
Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor
LinkedIn | My free Inventor Addin | My Repositories
Did you find this reply helpful ? If so please use the Accept as Solution/Like.
Hi @drafter2ZT9Z4 . You need to use the AddWithOptions method and add the FitViewsToSheet setting to it. Example code:
Dim oDDoc As DrawingDocument = TryCast(ThisDoc.Document, DrawingDocument)
If oDDoc Is Nothing Then Exit Sub
Dim oOptions As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap
Call oOptions.Add("FitViewsToSheet", True)
Dim oSheetF As SheetFormat = oDDoc.SheetFormats.AddWithOptions(oDDoc.ActiveSheet, "NewSheetFormat", oOptions)
Valid values are: Name = “FitViewsToSheet”, Value = Boolean
Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor
LinkedIn | My free Inventor Addin | My Repositories
Did you find this reply helpful ? If so please use the Accept as Solution/Like.
Can't find what you're looking for? Ask the community or share your knowledge.