I'm looking to autofill the View label in the Base View dialog box. in the past, I used some code that adds the words in the Format Text dialog box (see code below). This however, doesn't change the view name in the model browser.
Thank you for your help.
'Adds View Label Dim oSSet As SelectSet = ThisDoc.Document.SelectSet Dim oDoc As DrawingDocument = ThisDoc.Document Dim oSheet As Sheet = oDoc.ActiveSheet If oSSet.Count = 0 Then MessageBox.Show("You must select a drawing view first", "iLogic") Exit Sub End If 'Reference to the drawing view from the 1st selected object Dim oView As DrawingView = TryCast(oSSet.Item(1), DrawingView) If oView IsNot Nothing Then oView.ShowLabel = True 'format the model iproperties oView.Label.FormattedText = "ISOMETRIC VIEW" oStringScale = "<Br/><StyleOverride FontSize='0.5'>SCALE <DrawingViewScale/></StyleOverride>" 'add to the view label oView.Label.FormattedText = "ISOMETRIC VIEW" oView.Label.HorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextCenter Else MessageBox.Show("The selected object is not a drawing view", "iLogic") End If
Solved! Go to Solution.
Solved by Sergio.D.Suárez. Go to Solution.
Hi, with the following ilogic code you can change the name of the view that appears in the model browser.
Dim oView As DrawingView= ThisApplication.CommandManager.Pick(16898, "Select View") oView.Name = oView.Name.ToUpper.Replace(oView.Name,"New Name")
I hope this helps with your problem. Cheers
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn
Can't find what you're looking for? Ask the community or share your knowledge.