I'm looking by either key in or VBA to edit model properties. Set the Sheet Size to A3 and Design Scale to 1. Its to fix exported files from Revit to DGN.
Thanks in advance
please follow the forum best practices and specify what product and (exact) version you use.
Colin Duck said:Set the Sheet Size to A3 and Design Scale
To be precise, Sheet Size is not general model property, but "sheet model" property, because it does exist at normal "design" model.
Colin Duck said:I'm looking by either key in or VBA
Did you try to search this forum for similar discussions? It was discussed many times. Also, did you check MicroStation VBA documentation?
There is SheetDefinition object, that can be used to access settings like Sheet Size. Other settings are typically available as ModelReference properties. In same cases (when VBA class or method is not available), PropertyHandler can be used.
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Assuming your Sheet Size is precisely named A3, try the code below. Its crude but does the job.
Public Sub ChangeScaleandSheetSize()
Dim objModelRef As ModelReference
Dim iModelCount As Integer
For iModelCount = ActiveModelReference.DesignFile.Models.Count To 1 Step -1
Set objModelRef = ActiveModelReference.DesignFile.Models(iModelCount)
If objModelRef.Type = msdModelTypeSheet Then
CadInputQueue.SendKeyin "SHEET BOUNDARY SIZE ""A3"""
CadInputQueue.SendKeyin "MODEL SET ANNOTATIONSCALE 1.000000"
Answer Verified By: Colin Duck
This works exactly how I needed it to. Thanks for your help. I'm happy with crude, for this job. Its just to batch process a one of problem.
I'll be more prescriptive in the future. Barry was was able to solve my problem below.
Colin Duck said:This works exactly how I needed it
Please mark your question as 'Answered'.
Regards, Jon Summers LA Solutions