Helical Protrusion with VB and Solid Edge

Valued Contributor
Valued Contributor

 

Hi everybody,  My name is Andry Becerra and I am Mechanical Engineer from Venezuela. I am using Solid Edge from some years ago, now I am learning to customizing that and  I am interesting in make an helical protrusion using Visual basic but I have no idea. I need your help my friends… Thanks a lot.

I am using Solid Edge V19 and Visual Basic 6.0

 

Posted by: Andry Becerra
Post date: 12/14/2009 9:57:22 AM

4 REPLIES

RE: Helical Protrusion with VB and Solid Edge

Valued Contributor
Valued Contributor

 

I found into examples of Solid Edge Program the next code but I cant run it... What do you think about this?? where is the mistake??

Private Sub Form_Load()

Dim objApp As SolidEdgeFramework.Application

Dim objDoc As SolidEdgeAssembly.AssemblyDocument

Dim objAngRel As SolidEdgeAssembly.AngularRelation3d

Dim dblAngle As Double

Const TESTFILE = "T:\vbtests\testcases\Sample.asm"

' 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.Add("SolidEdge.AssemblyDocument")

objApp.Visible = True

Else

Set ObjDoc = objApp.ActiveDocument

End If

Call objDoc.Close

' opening an existing assembly document

Set objDoc = objApp.Documents.Open(TESTFILE)

' getting the angular relation in the Relations3D collection object for the assembly document

Set objAngRel = objDoc.Relations3d.Item(11)

' getting the angle defined in the angular relation and changing it

dblAngle = objAngRel.Angle

objAngRel.Angle = 3 * PI / 4

' USER DISPLAY

' Release objects

Set objApp = Nothing

Set objDoc = Nothing

Set objAngRel = Nothing

End Sub

 

Thanks

Andry

 

 

Posted by: Andry Becerra
Post date: 12/14/2009 2:10:33 PM

RE: Helical Protrusion with VB and Solid Edge

Valued Contributor
Valued Contributor

Andry,

I will look at that next week if you are not in a hurry...

(sorry to all for the Spanish conversation)

Puedo echarte una mano a partir del Lunes de la semana que viene.

Estoy completamente ocupado hasta entonces. Si no tienes mucha prisa miraré tu problema entonces.

Un saludo,

Julian

 

 

 

Posted by: Julian Guillo
Post date: 12/16/2009 5:24:00 AM

RE: Helical Protrusion with VB and Solid Edge

Valued Contributor
Valued Contributor

 

Hola Julian, gracias por responder, si estoy algo apurado por resolver esto, pero cualquier ayuda es muy importante hoy , el lunes, o cuando sea posible . Gracias amigo.

Hi Julian, thanks for your answer, I have some hurry for this, but any help is very important, today, next monday or when will be possible. Thanks my friend.

 

Posted by: Andry Becerra
Post date: 12/16/2009 7:19:55 AM

RE: Helical Protrusion with VB and Solid Edge

Valued Contributor
Valued Contributor

 

Andry,

Find attached a ZIP file with an example. See the comments in Spanish inside the VB project.

Un saludo,

Julian

 

 

Posted by: Julian Guillo
Post date: 12/22/2009 12:50:41 AM