欢迎来到冰豆网! | 帮助中心 分享价值,成长自我!
冰豆网
全部分类
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • 党团工作>
  • ImageVerifierCode 换一换
    首页 冰豆网 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    Catia百格线生成宏复习过程.docx

    • 资源ID:8691317       资源大小:17.52KB        全文页数:11页
    • 资源格式: DOCX        下载积分:12金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要12金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    Catia百格线生成宏复习过程.docx

    1、Catia百格线生成宏复习过程Catia百格线生成宏为此,装潢美观,亮丽,富有个性化的店面环境,能引起消费者的注意,从而刺激顾客的消费欲望。这些问题在今后经营中我们将慎重考虑的。调研结论:综上分析,我们认为在学院内开发“DIY手工艺品”商店这一创业项目是完全可行的。你是否为在Catia做2D图纸的时候,画百格线而伤脑筋呢?别担心,接下来我告诉你一个简单的方法1.新建一个txt文本文档,比如Draw-Grid.txt2.把以下内容复制到Draw-Grid.txt中这里开始,不要复制我Option Explicit * Purpose: This macro allows you to creat

    2、e Grid line in CATIA drawing Author: chenqa Languages: VBScript Locales: English Developing CATIA Level: V5R12 View mush parallel to system aixes,view angle 0deg,90deg and -90deg *Sub CATMain()CATIA.RefreshDisplay = FalseDim sStatus As String Set the CATIA popup file alerts to False It prevents to s

    3、top the macro at each alert during its execution CATIA.DisplayFileAlerts = False Optional: allows to find the sample wherever its installed Variables declaration Dim oDrwDocument As DrawingDocument Dim oDrwSheets As DrawingSheets Dim oDrwSheet As DrawingSheet Dim oDrwView As DrawingView Dim oFactory

    4、2D AS Factory2D The Distance between the lines Dim D As Integer Dim nx As Integer Dim ny As Integer The point coordinate select from Drawing Dim X1 As Integer Dim Y1 As Integer Dim X2 As Integer Dim Y2 As Integer Dim Pt1 As Point2D Dim Pt2 As Point2D The view scale dAngle for rotate view scale for v

    5、iew scale Dim dScale,dAngle As Double The view coordinate origin Dim X As Int Dim Y As Int Dim xSel As INFITF.Selection D= InputBox(Please Input the Distance Value, input box, 100) D= Cint (D) Retrive a new drawing document Set oDrwDocument = CATIA.ActiveDocument Retrieve the drawing documents sheet

    6、s collection Set oDrwSheets = oDrwDocument.Sheets Retrieve the active sheet Set oDrwSheet = oDrwSheets.ActiveSheet Retrieve the active view of the sheet Set oDrwView = oDrwSheet.Views.ActiveView Retrive the value of the view X= oDrwView.xAxisData Y= oDrwView.yAxisData dScale = oDrwView.Scale dAngle=

    7、 oDrwView.Angle Set oFactory2D = oDrwView.Factory2D Get the coordinate from the select two point On Error Resume Next Set xSel = CATIA.ActiveDocument.Selection xSel.clear ReDim sFilter(0) sFilter(0) = Point2D MsgBox Please select the left-bottom point sStatus = xSel.SelectElement2(sFilter, Select Fi

    8、rst Point., false) If (sStatus = Normal) Then Dim SelectedPoint1 As SelectedElement Set SelectedPoint1 = xSel.Item(1) Dim pt1Coord(2) As Int SelectedPoint1.GetCoordinates ( pt1Coord ) MsgBox The frst point has been selected Else MsgBox Select a 2D Point 1 Exit Sub End If MsgBox Please select the rit

    9、ht-top point sStatus = xSel.SelectElement2(sFilter, Select The Second Point., false) If (sStatus = Normal) Then Dim SelectedPoint2 As SelectedElement Set SelectedPoint2 = xSel.Item(1) Dim pt2Coord(2) As Int SelectedPoint2.GetCoordinates ( pt2Coord ) MsgBox The second point has been selected Else Msg

    10、Box Select a 2D point 1 Exit Sub End If if dAngle=0 then X1= Cint( (pt1Coord(0) - X)/dScale) Y1= Cint (pt1Coord(1) - Y)/dScale) X2= Cint (pt2Coord(0) - X)/dScale) Y2= Cint (pt2Coord(1) - Y)/dScale)end if MsgBox (pt1Coord(0) MsgBox X if dAngle0 then X1=Cint(pt1Coord(1)-Y)/dScale) Y1=Cint (pt1Coord(0)

    11、 -X)/dScale) X2= Cint (pt2Coord(1)-Y)/dScale) Y2= Cint (pt2Coord(0)-X)/dScale)end ifif dAngle0 then Di_V=-Di_Vend ifif dAngle0 then set Line2D1 = oFactory2D.CreateLine (X1-D/3,-Y1-D*i,X1+nx*D+D/3,-Y1-D*i) oSel.Add Line2D1 set Circle2D1=oFactory2D.CreateClosedCircle(X1+nx*D+D/3 +R,-Y1-D*i,R) oSel.Add

    12、 Circle2D1 set Line2D1= oFactory2D.CreateLine(X1+nx*D+D/3+R,-Y1-D*i+R,X1+nx*D+D/3+R,-Y1-D*i-R) oSel.Add Line2D1 Set MyText = oDrwView.Texts.Add(Text_XYZ_V,X1+nx*D+D/3+R +TextV,-Y1-D*i) MyText.AnchorPosition = catMiddleCenter MyText.SetFontSize 0, 0, iFontSize Set MyText = oDrwView.Texts.Add(Y1+D*i)*

    13、Di_V,X1+nx*D+D/3+R -TextV,-Y1-D*i) MyText.AnchorPosition = catMiddleCenter MyText.SetFontSize 0, 0, iFontSize end if if dAngle0 then set Line2D1 = oFactory2D.CreateLine (X1+D*j,-Y1+D/3,X1+D*j,-Y1-ny*D-D/3) oSel.Add Line2D1 set Circle2D1=oFactory2D.CreateClosedCircle(X1+D*j,-Y1+D/3+R,R) oSel.Add Circ

    14、le2D1 set Line2D1 = oFactory2D.CreateLine(X1+D*j,-Y1+D/3+R*2,X1+D*J,-Y1+D/3) oSel.Add Line2D1 Set MyText = oDrwView.Texts.Add(Text_XYZ_H,X1+D*j+TextV,-Y1+D/3+R) MyText.AnchorPosition = catMiddleCenter MyText.SetFontSize 0, 0, iFontSize Set MyText = oDrwView.Texts.Add(X1+D*j)*Di_H,X1+D*j-TextV,-Y1+D/

    15、3+R) MyText.AnchorPosition = catMiddleCenter MyText.SetFontSize 0, 0, iFontSize end if if dAngle0 then set Line2D1 = oFactory2D.CreateLine (-X1-D*j,Y1-D/3,-X1-D*j,Y1+ny*D+D/3) oSel.Add Line2D1 set Circle2D1=oFactory2D.CreateClosedCircle(-X1-D*j,Y1-D/3-R,R) oSel.Add Circle2D1 set Line2D1 = oFactory2D.CreateLine(-X1-D*j,Y1-D/3-R*2,-X1-D*J,Y1-D/3) oSel.Add Line2D1 Set MyText = oDrwView.Texts.Add(Text_X


    注意事项

    本文(Catia百格线生成宏复习过程.docx)为本站会员主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2022 冰点文档网站版权所有

    经营许可证编号:鄂ICP备2022015515号-1

    收起
    展开