Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Link proe with Excel

manjith.shaju

New member
Hii.
I need to link a simple proe assembly with an external
excel sheet.so that i can suppress any component in excel
so that the proe while regenerating updates according to
the excel sheet.Can any one help me in this.
Thank you
Manjith Shaju
 
Hello,


hereby an example how to link Pro E to Excel.2010-10-06_153307_TEST.zip


1. Open PrO/E and open 8888_cupboard.asm
2. Open Excel and open CUPBOARD_TEST.xlsx
3. Open 8888_cupboard.prt
4. Change a value in the EXCEL sheet ( change height, and change width, ( only change in the grey menu ) ==> then SAVE !
5. Regen external Analysis feature in 8888_cupboard.prt ( regen two times )( if doesn't work ==> edit definition of this feature and then regen part)
6. Open assembly ==> cupboard should be changed through Excel


==> Part is changed through Excel ( Do not open 8888.xls while Pro/E is open, this file translates variables from Excel to Pro/E )


Good luck
 
You can supress or make parts reappear the same way.
Make in your excell sheet a parameter "doors or no doors" ==> "YD"or "ND" ( no doors )


==> pass this parameter trough to Pro/E ( using the Excell analysis feauture )


==> In Pro/E use this parameter to make the door appear or be suppressed. ( in pro programm ==>


If DOORS_PAR =="ND" .... ( I can make you an example tomorrow )
 
Thank you so much mr.mieke..it would have been so helpfull if you provide me with an example
smiley1.gif
smiley1.gif
 
Manjith,

Did mieke-s provide an example of this parameter? If he did or you already have a solution, would you mind sharing it with us.
smiley1.gif
 
how to create line in proengineerusing visual basic

Respected sir/mam,


I am facing problem for entering into proe sketching environment while interfacing proengineer from visual basic 6.0,

Here i am pasting code ,based on this opening and closing can be done easily,how can we create line based on this code where we can add code for interact with sketch mode while connecting from visual basic

visual basic codes:

Dim asyncConnection As IpfcAsyncConnection
Dim cAC As CCpfcAsyncConnection
Dim session As IpfcBaseSession
Dim descModel As IpfcModelDescriptor
Dim descModelCreate As CCpfcModelDescriptor
Dim model As IpfcModel
Dim workDir As String
Dim asynconn As New pfcls.CCpfcAsyncConnection
Dim conn As pfcls.IpfcAsyncConnection
Dim oModel As pfcls.IpfcModel
Dim position As Integer


Dim new_paramowner As pfcls.IpfcParameterOwner

Private Sub Form_Load()btnRun_Click
End Sub
Private Sub btnRun_Click()

On Error GoTo RunError
'================================================= =====================
'First Argument : The path to the Pro/E executable along with command
'line options. -i and -g flags make Pro/ENGINEER run in non-graphic,
'non-interactive mode
'Second Argument: String path to menu and message files.
'================================================= =====================
Set cAC = New CCpfcAsyncConnection
Set asyncConnection = cAC.Start("D:\Program Files\proeWildfire 4.0\bin\proe.exe", "Working Directory")
MsgBox (asyncConnection.IsRunning)
Set session = asyncConnection.session
Set conn = asynconn.Connect("", "", ".", 5)
Set session = conn.session

'================================================= =====================
'Get current directory
'Set it as working directory
'================================================= =====================
workDir = " C:\Documents and Settings\Mech_Staff\My Documents\ptc_temp"
position = InStrRev(workDir, "\")
workDir = Left(workDir, position)
session.ChangeDirectory (workDir)

'Set oModel = session.CurrentModel
'MsgBox "Model name = " & oModel.FileName
'Set new_paramowner = oModel



'================================================= =====================
'VB api process calls and other processing to be done
'================================================= =====================
Set descModelCreate = New CCpfcModelDescriptor
Set descModel = descModelCreate.Create(EpfcModelType.EpfcMDL_PART, "partModel.prt", dbnull)
Set model = session.RetrieveModel(descModel)
'================================================= =====================
'End the Pro/E session when done
'================================================= =====================
If Not asyncConnection Is Nothing Then
If asyncConnection.IsRunning Then
asyncConnection.End
End If
End If
RunError:
If Err.Number <> 0 Then
MsgBox "Process Failed : Unknown error occured." + Chr(13) + _
"Error No: " + CStr(Err.Number) + Chr(13) + _
"Error: " + Err.Description, vbCritical, "Error"
If Not asyncConnection Is Nothing Then
If asyncConnection.IsRunning Then
asyncConnection.End
End If
End If
End If
End


End Sub



This code i reffered from VB_API_User_Guide_06_2009 from ptc website


if any one have the solution ,please suggest the rightful path for proceeding my m.tech project to interface cad component from visual basic 6.0 to proengineer 4.0.

sincere regards,
J.Shankar

Can u have the code for creating block or interacting with sketch mode in proe based on vb code,
 
Hi Please help

I am using Proe wf 5.0
for bill of material i m using excel file liked with ProE. but the problem is after making pdf of drawing there is a very low quality image in place of excel table. is this possible to convert PDF with selectable text of excel OR some higher quality image of excel.

Thanks.
 

Sponsor

Articles From 3DCAD World

Back
Top