|
CATIA V5 Programmierung : Bodys im Part benennen
MuckAlex123 am 14.05.2007 um 14:26 Uhr (0)
Hallo Catia Anwender. Ich habe folgendes Problem.Ich finde es extrem lästig wenn ich einen neuen Body einfüg das ich dann erst auf Properties gehen muss und ihn dort Umbenennen kann. Gibt es eine Möglichkeit wie beim einfügen eines Geometrical Sets einen Namen zu vergeben?Danke schon mal für eure Hilfe.Alex
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Bodys im Part benennen
Locke101 am 14.05.2007 um 15:48 Uhr (0)
Hallo,so wird immer der zuletzt eingefügte Body umbenannt:======================Sub CATMain()Dim documents1 As DocumentsSet documents1 = CATIA.DocumentsDim partDocument1 As PartDocumentSet partDocument1 = documents1.Item("NamePart.CATPart")Dim part1 As PartSet part1 = partDocument1.PartDim bodies1 As BodiesSet bodies1 = part1.Bodiesbodies1.Item(bodies1.Count).name = "NameBody"End Sub======================Gruß Locke101
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Bodys im Part benennen
Thomas Harmening am 14.05.2007 um 17:22 Uhr (0)
Language="VBSCRIPT"Sub CATMain()Dim mypartDocument As PartDocumentSet mypartDocument = CATIA.ActiveDocumentDim mypart As PartSet mypart = mypartDocument.PartsString = InputBox("Bitte einen Namen vergeben", "Bodybenennung", "nun mach was")Dim mybodies As bodiesSet mybodies = mypart.bodiesSet mybody = mybodies.Add()mybodies.Item(mybodies.Count).Name = UCase(sString)grossEnd Sub
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : aut. Part umbenennung
Lusilnie am 14.05.2007 um 21:21 Uhr (0)
Hallo allerseits,das Problem bei der Partnumber ist, (oder war zumindest soweit ich weiß in R14,) dass die "Partnumber" nicht "sperrbar" ist. D.h., sie läßt sich trotzdem bearbeiten, also über die Properties ändern. Das kann zu unerahnten oder nicht überschaubaren Folgen führen. Ich ändere z.B. die "Partnumber" über die Properties und speichere und schließe das Dokument anschließend. Bei nächsten Öffnen wird es aktualisiert und die Partnumber nach Formel geändert - wer soll das nachvollziehen?Ich habe das ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Distance Messung über Formel??
Elroman am 15.05.2007 um 17:28 Uhr (0)
Möchte gerne eine automatische Abstandsmessung zwischen einer Kante und einem Punkt über eine Formel generieren.Folgende Formel gibt Catia vor: " distance (Body, Body): Length"Auswahl Punkt nimmt er an, aber bei der Kante eines Quadrates gibt er mir nur den Pad zur Auswahl!!!Meine Frage: Kann man irgenwie auch nur die Kante selektieren anstatt den ganzen Körper?? Oder gibt es eine andere Messungsformel die diese Funktion enthält ?? Danke im Voraus [Diese Nachricht wurde von Elroman am 15. Mai. 2007 editier ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : CATDrawing neu verlinken
oherczeg am 16.05.2007 um 08:21 Uhr (0)
Hallo,ich das Problem, dass in meiner Zeichnung die Links auf catparts zeigen aber ich will auf Catproduct umhängen, direkt in Catia gehts nicht. Ich habe eure beiträge zu Thema gefunden. Würde es evtl. dass mit makro gehen. Gibts bei euch funktionierende Makro? Könntet ihr zumailen?------------------Gruss Otto
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Selection in einem Makro in VBA
Filippo am 01.07.2007 um 17:10 Uhr (0)
Hallo krisztian.furedi,so sollte auch in VBA funktionieren.---------------------------------------------------Sub CATMain() Dim SelWas(2) SelWas(0) = "Point" SelWas(1) = "Line" SelWas(2) = "HybridShapeCircleCtrRad" Dim Sel As Selection Set Sel = CATIA.ActiveDocument.Selection Sel.Clear Dim Elem As CATBSTR Do Elem = Sel.SelectElement2(SelWas, "Punkt, Linie oder Kreis (ESC=Abbrechen)", False) If Elem = "Cancel" Then Exit Sub End If MsgBox "Meine auswahl:" & Sel.Item(1).Value ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Länge eines Splines
Proofin am 21.05.2007 um 16:08 Uhr (0)
Moin Mutzi,versuch mal folgenden Code:-----------------------Code----------------------- Set SPAWb = CATIA.ActiveDocument.GetWorkbench("SPAWorkbench") Set oRef = CATIA.ActiveDocument.Part.CreateReferenceFromObject(My2DSpline) Set oMeas = SPAWb.GetMeasurable(oRef) Dim dLen As Double dLen = oMeas.Length-----------------------Code Ende-----------------------Bei mir funktioniert das.GrußProofin
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Selection.Search Problem mit R16
Locke101 am 22.05.2007 um 10:53 Uhr (0)
Hi,versuchs mal so:========================Dim productDocument1 As ProductDocumentSet productDocument1 = CATIA.ActiveDocumentDim selection1 As SelectionSet selection1 = productDocument1.Selectionselection1.clearSuchname = InputBox("Suchname eingeben") Suchname = Part1.1selection1.Search "CATAsmSearch.Part.Name=" & Suchname & ",all"============================Müsste funktionieren.Gruß Locke101
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Selection.Search Problem mit R16
CAMiCADse am 22.05.2007 um 13:30 Uhr (0)
Hallo YellowDevil,Danke, hat geklappt! Verstehen kann ich das aber nicht, weil wenn ich meine Zeile nach deiner zeile ausführe, läuft es ohne Fehler durch... Also:Code:Sub CATMAin()CATIA.ActiveDocument.Selection.Search ("Name=Part1.1 & CATProductSearch.Part,all") deineCATIA.ActiveDocument.Selection.Search "(Name=Part1.1 & CATProductSearch.Part),all" meine bzw. MakrorekorderEnd SubDa scheint irgendwo was verknotet zu sein, was mit deiner Zeile aufgelöst wird...Wie auch immer, solange es mit deiner Syntax ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Selection.Search Problem mit R16
CAMiCADse am 16.05.2007 um 15:46 Uhr (0)
Hallo zusammen,eine Suche mit Name= läuft mit R16 nicht mehr, nachdem der Benutzer einmal was in die Kommando-Zeile eingegeben hat.Folgendes Szenario:Product mit einem PartProduct1 I I-- Part1(Part1.1)Code:Sub CATMain()CATIA.ActiveDocument.Selection.search "(Name=Part1.1 & CATProductSearch.Part),all"End Sub1. Macro ausführen - OK2. In der Kommandozeile z.B. "c:Fit All In" eingeben3. Macro ausführen - ERROR!!! Meldung: Unknown command:Part1.1...4. Nach einem Neustart von CATIA läuft es wieder.Könnt ih ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Open file Box
toyo83 am 22.05.2007 um 14:21 Uhr (0)
Zitat:Original erstellt von YellowDevil:I hope its working!Sub CATMain()Dim FileFile=CATIA.FileSelectionBox("Filename", "*.catproduct", CATFileSelectionModeSave)CATIA.ActiveDocument.SaveAs FileEnd Subyes !!!but there is a error msg ByRef Argumnet, type mismatch and the compiler show the File as the bad argument
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Open file Box
toyo83 am 22.05.2007 um 14:28 Uhr (0)
Zitat:Original erstellt von toyo83: [QUOTE]Original erstellt von YellowDevil:[i]I hope its working!Sub CATMain()Dim FileFile=CATIA.FileSelectionBox("Filename", "*.catproduct", CATFileSelectionModeSave)CATIA.ActiveDocument.SaveAs FileEnd Subyes !!!but there is a error msg ByRef Argumnet, type mismatch and the compiler show the File as the bad argument[/i][/QUOTE]Ok it works !!You forgot to put File in brackets Thanks and best REGARDS guys !!!!!![Diese Nachricht wurde von toyo83 am 22. Mai. 2007 editiert.]
|
In das Form CATIA V5 Programmierung wechseln |