Please,help me
'ThreadNominalDiameter modified,but ThreadExternalDiameter don't
'modifide. Why?
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")
'If Err Then
'Err.Clear
'Set objApp = CreateObject("SolidEdge.Application")
'Set objDoc = objApp.Documents.Open(TESTFILE)
Set objDoc = objApp.Documents.Open(Filename:=TESTFILE)
' Get the model object in the test case
Set objModel = objDoc.Models(1)
'Get the Threads Object for the Model
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
l = 60
objHoleData.ThreadDescription = "sdfasd"
objHoleData.ThreadNominalDiameter = m / 1000
objHoleData.ThreadExternalDiameter = m / 2000 'Don't modified,
'Please to *.dft see it.
objDoc.Recompute
Call objVars.Edit("M", m)
Call objVars.Edit("l", l)
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP