iCAx开思工具箱

标题: se螺纹开发问题 [打印本页]

作者: bbs    时间: 2004-6-30 16:29
标题: se螺纹开发问题
'零件就是一个20的圆柱,在上面加上螺纹,用下面的程序对螺纹小径进行修改  
’可是螺纹并没有修改完成。选择编辑螺纹-参数(里面已经有"sdf"项)-完成  
‘到这螺纹小径才最终修改完成,可是怎么用程序来实现那?请赐教!!!  
  
Dim objApp As SolidEdgeFramework.Application  
Dim objDoc As SolidEdgePart.PartDocument  
Dim objModel As SolidEdgePart.Model  
Dim objThreads As SolidEdgePart.Threads  
Dim objThread As SolidEdgePart.Thread  
Dim objHoleColl As SolidEdgePart.HoleDataCollection  
Dim objHoleData As SolidEdgePart.HoleData  
Dim objVars As SolidEdgeFramework.Variables  
Dim objVar1 As SolidEdgeFramework.Variable  
Const TESTFILE = "D:\2.par"  
' Report errors  
Const PI = 3.14159265358979  
' Create/get the application with specific settings  
On Error Resume Next  
Set objApp = GetObject(, "SolidEdge.Application")  
Set objDoc = objApp.Documents.Open(Filename:=TESTFILE)  
Set objModel = objDoc.Models(1)  
Set objThreads = objModel.Threads  
Set objThread = objThreads.Item(1)  
Set objVars = objDoc.Variables  
Set objHoleData = objThread.HoleData  
Dim m As Long  
Dim l As Long  
m = 20  
objDoc.HoleDataCollection.Item(1).ThreadDescription = "sdf"  
objDoc.HoleDataCollection.Item(1).ThreadNominalDiameter = m/ 1000  
objDoc.HoleDataCollection.Item(1).ThreadExternalDiameter = m/1.2 / 100
作者: bbs    时间: 2004-7-5 08:58
ThreadNominalDiameter大径被修改了,ThreadExternalDiameter小径怎么没有修改?why?




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3