|
CATIA V5 Programmierung : äquidistate Punkte auf Spirale bei Lochplatte
imation1999 am 29.12.2015 um 19:33 Uhr (1)
Hi Aljoscha,ich würde evtl. folgendes machen:- ein zweites Knowledges Pattern erstellen (Reihenfolge des Ablauf beachten)- zweites KWE Pattern durch die Punkte laufen lassenGrober Ablauf (Ich habe leider gerade kein CATIA):Code:let point1(point).....point1 = ...PointsList-GetItem(i) `PointsList aus den erstem KWE Patternif distance(point1; ....) ...{point1.Activity = False}[Diese Nachricht wurde von imation1999 am 29. Dez. 2015 editiert.]
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Selection add
imation1999 am 21.02.2014 um 09:22 Uhr (1)
Hallo Zusammen,ich würde ein Element aus mein selection entfernen.Mein Code sieht so aus:Code:Sub CATMain()Dim partDocument1 As DocumentSet partDocument1 = CATIA.ActiveDocumentSet part1 = partDocument1.PartSet hybridBodies1 = part1.HybridBodiesSet hybridBody1 = hybridBodies1.Item("Geometrical Set.1")Set hybridShapes1 = hybridBody1.HybridShapesSet hybridShapePointCoord1 = hybridShapes1.Item("Point.2")Dim selection1 As SelectionSet selection1 = partDocument1.Selectionselection1.Search "(((((CATStFreeStyleSea ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Stack Size verringern per Skript
imation1999 am 19.11.2013 um 12:22 Uhr (1)
Hallo Thomas, hallo Bernd,vielen Dank Eure Antwort.also: "i" bleibt immer auf 1.Es wurde immer das gleiche Part aufgerufen.Ich habe mein Code so geändert:Code:Sub Scan(product1)Set selection1 = CATIA.ActiveDocument.SelectionFor i = 1 To product1.Count If product1.Item(i).Products.Count 0 Then Set product2 = product1.Item(i).Products Scan product2 Else Set part1 = product1.Item(i).ReferenceProduct.Parent.Part End If NextEnd Sub
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : CATIA.StatusBar Zähler - Sieht man gar nicht
imation1999 am 29.08.2012 um 15:20 Uhr (0)
Hallo Zusammen,mit folgende Schleife sieht man die "Zähler" auf StatusBar nicht. Code:For i = 1 To UBound(SelBckup)CATIA.StatusBar = i & " / " & UBound(SelBckup)UserSelection.ClearUserSelection.Add SelBckup(i)......Aber ich möchte Info über die aktuelles "i".Vielen Dank im Voraus
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : CATIA.StatusBar Zähler - Sieht man gar nicht
imation1999 am 29.08.2012 um 15:49 Uhr (0)
Hallo HoBLila,vielen Dank für Deine Antwort.Hilft das leider nicht!Mit catia.RefreshDisplay = True ist mein Schleife viel langsamer. (diese hat keine Wirkung auf StatusBar)Auf StatusBar sieht man die aktuelles "blabla.selected", und meine Zähler ist nur für ein klitzenkleinen Augenblick da.
|
In das Form CATIA V5 Programmierung wechseln |
 |
CATIA V5 Programmierung : CATIA.StatusBar Zähler - Sieht man gar nicht
imation1999 am 29.08.2012 um 17:32 Uhr (0)
Hallo Rick,vielen Dank für Deine Antwort.DoEvents hat leider auch nichts gebracht! Aber habe eine Zwischenlösung gefunden:Code:For i = 1 To UBound(SelBckup)UserSelection.ClearCATIA.StatusBar = i & " / " & UBound(SelBckup)UserSelection.Add SelBckup(i)CATIA.StatusBar = i & " / " & UBound(SelBckup)......Es blitzt ein bisschen, aber sieht man etwas davon.Es wäre wunderbar, ein Userform mit ProgressBar zu zeigen. (siehe Anhang)
|
In das Form CATIA V5 Programmierung wechseln |
 |
CATIA V5 Programmierung : Winkel zwischen 2 Linien messen
imation1999 am 23.09.2012 um 09:51 Uhr (0)
Hallo Zusammen,mit folgende Code möchte ich den Winkel zwischen 2 Linie messen:Code:Language="VBSCRIPT"Sub CATMain()Dim partDocument1 As DocumentSet partDocument1 = CATIA.ActiveDocumentDim part1 As PartSet part1 = partDocument1.PartDim UserSelection as SelectionSet UserSelection = CATIA.ActiveDocument.SelectionDim Mes1 As Referencedim status Dim Was(0)Was(0)="Line"UserSelection.Clearstatus=UserSelection.SelectElement2(was, "Select a Line", False)Set Mes1=part1.CreateReferenceFromObject(UserSelection.Item(1 ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Body von Part in Produkt selektieren/verstecken
imation1999 am 25.09.2012 um 12:05 Uhr (0)
Hallo Benjamin, wenn ich die Aufgabe gut verstanden:HauptProduct muß ACTIV sein.Code:Language="VBSCRIPT"Sub CATMain()Dim productDocument1 As DocumentSet productDocument1 = CATIA.ActiveDocumentDim selection1 As SelectionSet selection1 = productDocument1.Selectionselection1.Search "(Name="PartName" & CATPrtSearch.PartFeature),all"selection1.Search "(Name="BodyName" & ((((CATStFreeStyleSearch.BodyFeature + CATPrtSearch.BodyFeature) + CATGmoSearch.BodyFeature) + CATSpdSearch.SpdBodyRef) + CATSpdSearch.Bo ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : CreateReferenceFromName - Schleife
imation1999 am 29.11.2012 um 07:29 Uhr (0)
Morgen Zusammen,Ich möchte in einem Product mehrere Coincidence Constraint erzeugen. (Absolute Axis System:Z-Achse zu Absolute Axis System:Z-Achse)Erstmal wähle ich die Parts manuell aus (selection1)Was stimmt hier nicht?"CATIA.ActiveDocument.Product.Name & "/" & selection1.Item(i).value.name & "/!" & Selection_REdge...Code:For i = 1 To selection1.CountSet reference2 = product1.CreateReferenceFromName("CATIA.ActiveDocument.Product.Name & "/" & selection1.Item(i).value.name & "/!" & Selection_REdge:(Edg ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Farbe zurücksetzen
imation1999 am 02.03.2016 um 14:14 Uhr (1)
Hallo,versuch mal ein Code:CATIA.RefreshDisplay = True einbauen.
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : SubCATMain() - Automation error
imation1999 am 29.01.2013 um 11:16 Uhr (0)
Hallo Zusammen,das Problem ist folgendesnach neu installation (WIN7, CATIA V5 R18 SP4) kann ich mein catvba project nicht laufen lassan.Automation errorUnbekannter Fehlerund SubCATMain() ist gelb markiert Für Eure Hilfe bedanke ich im voraus
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Part im Product aktiv setzen
imation1999 am 04.03.2013 um 21:45 Uhr (0)
Hallo Rick,vielen Dank für den Code! Aber ich würde mit folgendem Code, eins nach dem anderen aktivieren (Aktiv setzen).Also: Part1.1, dann Part1.2, dann Part1.3, ...usw.Es funktionert, wenn ich mehrere verschiedene Part habe. Bei mehrere Instancen (gleiche Parts) geht das leider nicht. Immer wird geliche Part (z.B. Part1.1) aktiv sein. Was mache ich falsch?Code:For i = 1 To UBound(SelBackup) Selection1.Clear Selection1.Add SelBackup(i) Set part1 = selection1.Item2(1).Value.ReferenceProduct.Parent.part ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Repeat Points on Curve
imation1999 am 18.04.2013 um 11:11 Uhr (0)
so z.B:Code:Language="VBSCRIPT"Sub CATMain()Dim partDocument1 As DocumentSet partDocument1 = CATIA.ActiveDocumentDim part1 As PartSet part1 = partDocument1.PartDim hybridBodies1 As HybridBodiesSet hybridBodies1 = part1.HybridBodiesDim hybridBody1 As HybridBodySet hybridBody1 = hybridBodies1.Item("Geometrical Set.1")Dim hybridShapes1 As HybridShapesSet hybridShapes1 = hybridBody1.HybridShapesDim hybridShapeLinePtDir1 As HybridShapeSet hybridShapeLinePtDir1 = hybridShapes1.Item("Line.1")Dim reference1 As Ref ...
|
In das Form CATIA V5 Programmierung wechseln |