社区
Inventor 产品技术应用讨论区
欢迎访问欧特克Inventor论坛!分享知识,发帖提问,浏览Inventor热帖
取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

iLogic——快速设置视图标签

3 条回复3
回复
1 条消息(共 4 条)
Anonymous
372 次查看, 3 条回复

iLogic——快速设置视图标签

'快速设置视图标签,适用于基本视图,投影视图,详细视图,剖切视图和展开视图
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 
标记 (2)
标签 (2)
3 条回复3
2 条消息(共 4 条)
bhavik4244
回复: Anonymous

@Anonymous 

 

Are you looking for something?


Bhavik Suthar
3 条消息(共 4 条)

我感觉他是在分享 iLogic。



Henry Huang
Product Support Specialist, Frontline Technical Support
Customer Service and Support, GCSO
Autodesk, Inc.

4 条消息(共 4 条)
Yong.Jing
回复: Anonymous

@Anonymous  您最近做了大量的iLogic的练习吧,还分享到论坛中。 感谢。 若能分享源代码, 就能更好的大家帮助大家了。 欢迎常到论坛来逛逛。 



Yong Jing
Product Support Senior Specialist
Technical Support, CSS, GPS

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!
如果我的回帖解决了您的问题,请点击 "接受为解决方案" 按钮. 这可以帮助其他人更快的找到解决方案!

找不到想要的内容?向社区提问或分享您的知识。

到论坛发帖  

”