585.987 aktive Mitglieder*
4.621 Besucher online*
Kostenfrei registrieren
Anmelden Registrieren
HEXAGON Production Software Forum

Ihre Vielseitigen Softwarelösungen

Regelerkennung

Beitrag 15.07.2010, 08:26 Uhr
mbc
mbc
Level 1 = Community-Lehrling
*
Gruppe: Mitglied
Mitglied seit: 03.05.2010
Beiträge: 25

Hi Leute,

ich mochte mit dem Prozessmanager ein wenig automatisieren, finde aber die passende Erkennungsregel für mein Feature nicht.

Ich möchte ein 3D-Feature bearbeiten. Den Featuretyp kann ich einstellen, jedoch weis ich bei der Elementerkennungsregel nicht was ich dort nun eintragen muß. Wenn ich das Feld leer lasse funktioniert es nicht.

Was muß ich somit nun dort eintragen damit ich erkenne das es sich um ein 3D-Feature handelt?

"IS3dfeature(Feature)"

Ich konnte auch in den Einträgen nichts passendes finden.

Vielen Dank

MFG
Marco


--------------------
Esprit 2010 SP3
Hurco VMX30 mit WInmax-Steuerung
TOP    
Beitrag 15.07.2010, 09:57 Uhr
mbc
mbc
Level 1 = Community-Lehrling
*
Gruppe: Mitglied
Mitglied seit: 03.05.2010
Beiträge: 25

Nachdem sich der KBM mal wieder aufgehängt hat (mei is das Ding verbuggt, sowas hab ich in meinem Leben noch nicht erlebt) funktioniert es auch mit ISFace(Feature)

Nächstes Problem wacko.gif

Ich brauche die Abmaße meines Fertigteile (muß man da jetzt zwischen Solid und STL unterscheiden?)

Wie kommen ich also an die min und max Werte des Teiles ? Das dürfte etwas heftiger werden was die programmierung angeht, ich bin Neuling in VBA und muß da jetz auf die Schnelle mal eben vieles machen. Wie komme ich an die Werte ran?

Mit
QUOTE
GetMinZFromPiece(Feature)
klappt das so nicht direkt, oder muß ich bei "Feature" noch etwas spezifisches angeben?
Ich vermute mal Esprit würde gerne wissen was nun eigegntlich mein Piece ist, oder ?


MFG

Der Beitrag wurde von mbc bearbeitet: 15.07.2010, 10:02 Uhr


--------------------
Esprit 2010 SP3
Hurco VMX30 mit WInmax-Steuerung
TOP    
Beitrag 16.07.2010, 12:10 Uhr
cnc-fritzle
cnc-fritzle
Level 2 = Community-Facharbeiter
**
Gruppe: Mitglied
Mitglied seit: 26.05.2007
Beiträge: 114

' ------------------------------------------------------------------------
' Copyright © 1998-2007 DP Technology Corp.
'
' This sample code file is provided for illustration purposes. You have a
' royalty-free right to use, modify, reproduce and distribute the sample
' code files (and/or any modified versions) in any way you find useful,
' provided that you agree that DP Technology has no warranty obligations
' or liability whatsoever for any of the sample code files, the result
' from your use of them or for any modifications you may make. This notice
' must be included on any reproduced or distributed file or modified file.
' ------------------------------------------------------------------------

Option Explicit

Public Sub BoundingBoxSolidDemo()
Dim SolidObj As Esprit.Solid, BoundingObj As Esprit.SimulationSolid
On Error Resume Next ' in case Esc is pressed
Set SolidObj = document.GetAnyElement("Select Solid", espSolidModel)
On Error GoTo 0
If SolidObj Is Nothing Then Exit Sub
'
Set BoundingObj = BoundingBox3DSolid(SolidObj)
'
' With Application.OutputWindow
' .Visible = True
' Call .Text("Bounding Box Height = " & BoundingObj.Height & vbCrLf)
' Call .Text("Bounding Box Length = " & BoundingObj.Length & vbCrLf)
' Call .Text("Bounding Box Width = " & BoundingObj.Width & vbCrLf)
' End With
End Sub

Function ComPointToPoint(ComPointObj As EspritGeometry.ComPoint) As Esprit.Point
With ComPointObj
Set ComPointToPoint = document.GetPoint(.X, .Y, .Z)
End With
End Function

Function BoundingBox3DSolid(ByRef SolidObj As Esprit.Solid) As Esprit.SimulationSolid
Dim Body As EspritSolids.SolidBody
Set Body = SolidObj.SolidBody
'
' initialize the matrix and set the origin and vectors to match the active plane
Dim PlaneMatrix As EspritGeometry.ComMatrix, BoxCorner(1) As EspritGeometry.ComPoint
Set PlaneMatrix = New EspritGeometry.ComMatrix
With document.ActivePlane
Call PlaneMatrix.P.SetXyz(.X, .Y, .Z)
Call PlaneMatrix.u.SetXyz(.Ux, .Uy, .Uz)
Call PlaneMatrix.v.SetXyz(.Vx, .Vy, .Vz)
Call PlaneMatrix.W.SetXyz(.Wx, .Wy, .Wz)
End With
'
' note that the box corners must be initialized before calling the Box method
Set BoxCorner(0) = New EspritGeometry.ComPoint
Set BoxCorner(1) = New EspritGeometry.ComPoint
Call Body.Box(PlaneMatrix, BoxCorner(0), BoxCorner(1))
'
' add a stock block to the built in simulation based on those corner points
With document.Simulation
Set BoundingBox3DSolid = .AddBlock("Solid Box Stock", espSimSolidTypeStock, _
ComPointToPoint(BoxCorner(0)), ComPointToPoint(BoxCorner(1)))
End With
BoundingBox3DSolid.Color = vbBlue
End Function
TOP    
Beitrag 21.07.2010, 11:25 Uhr
mbc
mbc
Level 1 = Community-Lehrling
*
Gruppe: Mitglied
Mitglied seit: 03.05.2010
Beiträge: 25

thumbs-up.gif
super.gif
spitze.gif
danke.gif

Das ist ja Super, da hab ich gleich ein tolles Beispiel zum erlernen ...

Ich danke DIr recht herzlich, jetzt kann ich die Schritte nachvollziehen, so ein Beispiel hilft ungemein beim lernen, die Beschreibung der API ist zar auch nicht schlecht, aber manche Zusammenhänge versteht man auch da nicht immer.

Wenn die Kurse mal nicht so kostspielig wären ... kleine Unternehmer können sich die heute noch kaum leisten ...

Danke vielmals für das Beispiel !!!!


--------------------
Esprit 2010 SP3
Hurco VMX30 mit WInmax-Steuerung
TOP    
Beitrag 21.07.2010, 15:39 Uhr
mbc
mbc
Level 1 = Community-Lehrling
*
Gruppe: Mitglied
Mitglied seit: 03.05.2010
Beiträge: 25

Hier schlägt leider der Compiler mit "Benutzerdefiniterter Typ nicht definiert" fehl:

QUOTE
Function ComPointToPoint(ComPointObj As EspritGeometry.ComPoint) As Esprit.Point


Ich habe wohl keine "ComPoints" als Typen weil ich auch keine "EspritGeometry"-Base habe ...

Ich habe einmal ein bißchen recherchiert, in 2009 gabs die noch. Muß man die ggf. noch extra dazu laden, oder wird die vom VB-Editor automatisch eingebunden?

Der Beitrag wurde von mbc bearbeitet: 21.07.2010, 15:40 Uhr


--------------------
Esprit 2010 SP3
Hurco VMX30 mit WInmax-Steuerung
TOP    
Beitrag 22.07.2010, 08:44 Uhr
cnc-fritzle
cnc-fritzle
Level 2 = Community-Facharbeiter
**
Gruppe: Mitglied
Mitglied seit: 26.05.2007
Beiträge: 114

Wenn Du im VBA-Editor bist aktiviere unter Extras Verweise alles was mit Esprit zu tun hat!
Angehängte Datei(en)
Angehängte Datei  verweise.bmp ( 518.87KB ) Anzahl der Downloads: 26
 
TOP    
Beitrag 22.07.2010, 09:47 Uhr
mbc
mbc
Level 1 = Community-Lehrling
*
Gruppe: Mitglied
Mitglied seit: 03.05.2010
Beiträge: 25

Yupp, das wars, jetzt läufts und funktioniert super !
Jetzt noch den Code verstehen lernen und dann kann ich loslegen.

Vielen Dank ! thumbs-up.gif

Der Beitrag wurde von mbc bearbeitet: 22.07.2010, 09:47 Uhr


--------------------
Esprit 2010 SP3
Hurco VMX30 mit WInmax-Steuerung
TOP    
Beitrag 14.06.2013, 12:59 Uhr
L-Noerber
L-Noerber
Level 1 = Community-Lehrling
*
Gruppe: Mitglied
Mitglied seit: 16.01.2012
Beiträge: 11

QUOTE (cnc-fritzle @ 16.07.2010, 13:10 Uhr) *
' ------------------------------------------------------------------------
' Copyright © 1998-2007 DP Technology Corp.
'
' This sample code file is provided for illustration purposes. You have a
' royalty-free right to use, modify, reproduce and distribute the sample
' code files (and/or any modified versions) in any way you find useful,
' provided that you agree that DP Technology has no warranty obligations
' or liability whatsoever for any of the sample code files, the result
' from your use of them or for any modifications you may make. This notice
' must be included on any reproduced or distributed file or modified file.
' ------------------------------------------------------------------------

Option Explicit

Public Sub BoundingBoxSolidDemo()
Dim SolidObj As Esprit.Solid, BoundingObj As Esprit.SimulationSolid
On Error Resume Next ' in case Esc is pressed
Set SolidObj = document.GetAnyElement("Select Solid", espSolidModel)
On Error GoTo 0
If SolidObj Is Nothing Then Exit Sub
'
Set BoundingObj = BoundingBox3DSolid(SolidObj)
'
' With Application.OutputWindow
' .Visible = True
' Call .Text("Bounding Box Height = " & BoundingObj.Height & vbCrLf)
' Call .Text("Bounding Box Length = " & BoundingObj.Length & vbCrLf)
' Call .Text("Bounding Box Width = " & BoundingObj.Width & vbCrLf)
' End With
End Sub

Function ComPointToPoint(ComPointObj As EspritGeometry.ComPoint) As Esprit.Point
With ComPointObj
Set ComPointToPoint = document.GetPoint(.X, .Y, .Z)
End With
End Function

Function BoundingBox3DSolid(ByRef SolidObj As Esprit.Solid) As Esprit.SimulationSolid
Dim Body As EspritSolids.SolidBody
Set Body = SolidObj.SolidBody
'
' initialize the matrix and set the origin and vectors to match the active plane
Dim PlaneMatrix As EspritGeometry.ComMatrix, BoxCorner(1) As EspritGeometry.ComPoint
Set PlaneMatrix = New EspritGeometry.ComMatrix
With document.ActivePlane
Call PlaneMatrix.P.SetXyz(.X, .Y, .Z)
Call PlaneMatrix.u.SetXyz(.Ux, .Uy, .Uz)
Call PlaneMatrix.v.SetXyz(.Vx, .Vy, .Vz)
Call PlaneMatrix.W.SetXyz(.Wx, .Wy, .Wz)
End With
'
' note that the box corners must be initialized before calling the Box method
Set BoxCorner(0) = New EspritGeometry.ComPoint
Set BoxCorner(1) = New EspritGeometry.ComPoint
Call Body.Box(PlaneMatrix, BoxCorner(0), BoxCorner(1))
'
' add a stock block to the built in simulation based on those corner points
With document.Simulation
Set BoundingBox3DSolid = .AddBlock("Solid Box Stock", espSimSolidTypeStock, _
ComPointToPoint(BoxCorner(0)), ComPointToPoint(BoxCorner(1)))
End With
BoundingBox3DSolid.Color = vbBlue
End Function


Wäre es möglich noch einen Rahmen um das Solid zu zeichen ?
TOP    
Beitrag 14.06.2013, 20:34 Uhr
cnc-olaf
cnc-olaf
Level 3 = Community-Techniker
***
Gruppe: Mitglied
Mitglied seit: 24.03.2004
Beiträge: 199

hallo profis....

ich stehe noch ganz am anfang von VBA-Regeln...

ich suche noch ein wenig hilfe zum thema KM-Senkungen automatisieren..

ich bin soweit das ich die bohrungen und die senkungen automatisiert hab

bohren mit ikz werkzeug:

GetToolByID(GetToolByDiameter(156,Round(Feature.Diameter,1),False,,"IKZ%",,"aaa_5-Achs"))

das ansenken dazu:

GetToolByID(GetToolByDiameter(156,Round(Feature.Diameter+4,1),False,,"Anbohrer %",,"aaa_5-Achs"))

nu will ich die obere senkung für den kopf mit einem werkzeug spiralförmig aufräsen,
das wkz sollte "kleiner oder gleich" der bohrung sein !
es sollte ein wkz mit der benennung "HPC" sein !
und es sollte aus der kkz datenbank "aaa_5-Achs" kommen !

wer kann helfen ?

lieben dank im vorraus

cnc-olaf
(dernochganzschönviellernenmuss)
TOP    
Beitrag 14.06.2013, 22:09 Uhr
cnc-olaf
cnc-olaf
Level 3 = Community-Techniker
***
Gruppe: Mitglied
Mitglied seit: 24.03.2004
Beiträge: 199

wo stehen eigentlich die ID ´s für die werkzeuge...ich suche die id für ein end mill ???
TOP    
Beitrag 14.06.2013, 23:15 Uhr
cnc-olaf
cnc-olaf
Level 3 = Community-Techniker
***
Gruppe: Mitglied
Mitglied seit: 24.03.2004
Beiträge: 199

erledigt....

hab es so gelöst

GetToolByID(GetToolByDiameter(155,(Feature.Diameter-1%),False,,"HPC%",,"aaa_5-Achs"))






QUOTE (cnc-olaf @ 14.06.2013, 21:34 Uhr) *
hallo profis....

ich stehe noch ganz am anfang von VBA-Regeln...

ich suche noch ein wenig hilfe zum thema KM-Senkungen automatisieren..

ich bin soweit das ich die bohrungen und die senkungen automatisiert hab

bohren mit ikz werkzeug:

GetToolByID(GetToolByDiameter(156,Round(Feature.Diameter,1),False,,"IKZ%",,"aaa_5-Achs"))

das ansenken dazu:

GetToolByID(GetToolByDiameter(156,Round(Feature.Diameter+4,1),False,,"Anbohrer %",,"aaa_5-Achs"))

nu will ich die obere senkung für den kopf mit einem werkzeug spiralförmig aufräsen,
das wkz sollte "kleiner oder gleich" der bohrung sein !
es sollte ein wkz mit der benennung "HPC" sein !
und es sollte aus der kkz datenbank "aaa_5-Achs" kommen !

wer kann helfen ?

lieben dank im vorraus

cnc-olaf
(dernochganzschönviellernenmuss)
TOP    



1 Besucher lesen dieses Thema (Gäste: 1)
0 Mitglieder: