社区
'快速设置视图标签,适用于基本视图,投影视图,详细视图,剖切视图和展开视图 Do oView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "点击视图 或 点击Esc退出!") If oView IsNot Nothing Then oView.ShowLabel = True oStringScale = "<Br/><StyleOverride FontSize='0.35'>Scale (<DrawingViewScale/>)</StyleOverride>" '详细视图 If oView.Type = 117474304 Then oVname = "<StyleOverride Underline='True' FontSize='0.5'> 详细 <DrawingViewName/></StyleOverride>" 'add to the view label oView.Label.FormattedText = oVname & oStringScale 'Set the text center alignment oView.Label.HorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextCenter '剖切视图 ElseIf oView.Type = 117463296 Then oVname = "<StyleOverride Underline='True' FontSize='0.5'> 截面 <DrawingViewName/> - <DrawingViewName/></StyleOverride>" 'add to the view label oView.Label.FormattedText = oVname & oStringScale 'Set the text center alignment oView.Label.HorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextCenter '其它视图 Else If oView.IsFlatPatternView = True Then oView.Name = "展开视图" oVname = "<StyleOverride Underline='True' FontSize='0.5'> <DrawingViewName/></StyleOverride>" 'add to the view label oView.Label.FormattedText = oVname & oStringScale 'Set the text center alignment oView.Label.HorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextCenter Else oVname = "<StyleOverride Underline='True' FontSize='0.5'> <DrawingViewName/></StyleOverride>" 'add to the view label oView.Label.FormattedText = oVname & oStringScale 'Set the text center alignment oView.Label.HorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextCenter End If End If End If Loop While Not oView Is Nothing
@Anonymous 您最近做了大量的iLogic的练习吧,还分享到论坛中。 感谢。 若能分享源代码, 就能更好的大家帮助大家了。 欢迎常到论坛来逛逛。