PROE二次开发

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Imports pfcls
Public Class Form1
Private a As IpfcAsyncConnection = Nothing
Private b As IpfcBaseSession
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
a = (New CCpfcAsyncConnection).Start("C:\Program Files\proeWildfire 5.0\bin\proe.exe""C:\Program Files\proeWildfire 5.0\bin\proe.exe", ".")
b = a.Session
b.ChangeDirectory("F:\proe_exampledir")
End Sub
End Class






Imports pfcls
Imports System.Data.SqlClient
Public Class Form1

Private a As IpfcAsyncConnection = Nothing
Private b As IpfcBaseSession



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Try
a = (New CCpfcAsyncConnection).Start("C:\Program Files\proeWildfire 5.0\bin\proe.exe", ".") 'Pro/e的启动路径
b = a.Session
b.ChangeDirectory("D:\pro培训") '改变工作目录()
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
Me.TopMost = True

End Sub
End Class




Public Sub openfile(ByRef session As IpfcBaseSession, _
ByVal componentFileName As String)
Dim cmodel As IpfcModel
Dim modelDesc As IpfcModelDescriptor
Dim componentModel As IpfcSolid

modelDesc = (New CCpfcModelDescriptor).CreateFromFileName(componentFileName)
componentModel = session.GetModelFromDescr(modelDesc)

componentModel = session.RetrieveModel(modelDesc)

cmodel = CType(componentModel, IpfcModel)
cmodel.Display()

End Sub

相关文档
最新文档