worum es eigentlich geht, ich hab ja dein programm:
CoordSys coord;
double matrix[9], position[3];
int ret, ia = 5;
UF_UI_lock_ug_access(UF_UI_FROM_CUSTOM);
ret = uc1630("Bestimmen Sie die Einfüge-Position", &ia, matrix, position);
UF_UI_unlock_ug_access(UF_UI_FROM_CUSTOM);
switch( ret)
{
case 1:
case 2:
return E_ABORT; // Abbruch
case 3:
coord = CoordSys(position, Matrix3(matrix));
break;
case 7:
return E_FAIL; // Fehler
case 8:
break;
}
jetzt hab ich das auf vb.net angepasst:
Dim o As NXOpen.UF.UFUi '???
Dim point_tag As NXOpen.Tag
Dim base_pt(2) As Double
Dim response As Integer
Dim nxopenSession As NXOpen.UF.UFSession = NXOpen.UF.UFSession.GetUFSession()
nxopenSession.Ui.LockUgAccess(NXOpen.UF.UFConstants.UF_UI_FROM_CUSTOM)
Try
o.PointConstruct("Bestimmen Sie die Einfüge-Position", o.PointBaseMethod.PointIntersectPt, point_tag, base_pt, response)
Finally
nxopenSession.Ui.UnlockUgAccess(NXOpen.UF.UFConstants.UF_UI_FROM_CUSTOM)
End Try
Select Case ret
Case 1, 2
Return E_ABORT ' Abbruch
Case 3
coord = CoordSys(position, Matrix3(matrix))
Case 7
Return E_FAIL; ' Fehler
Case 8
End Select
das uc1630 ist bei mir PointConstruct jetzt muss ich nur noch den deklarieren:
Dim o As NXOpen.UF.UFUi '???
soll ungefähr so aussehen an einem anderen funktion gezeigt:
Dim nxopenSession As NXOpen.UF.UFSession = NXOpen.UF.UFSession.GetUFSession()
weist du viellecht wie man das macht
danke in vorraus.
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP