Sure I know for Genreate CATPart from Product... command, problem is that it does not preserve colors of bodies or faces. If you do copy/paste "in context" it does preserve.
Hi all!
I'm trying to code macro which would copy bodies from all parts and instances in assembly (1st level) and paste them (as result) in newly created part in same assembly.
Problem is that if I do the same thing manually, positions of fasted bodies are as in source part or instance, if I...
Hi!
I would need a bit of explanation why my code skips parts with only one body (PartBody) so it's name is not listed in immediate?
Sub CATMain()
Dim RootProduct As Product
Set RootProduct = CATIA.ActiveDocument.Product
'first check if document is part or product
If...
Hi!
After changing computer and reinstall Catia, I'm heaving problem using ttf fonts installed additionally, as I can not see them in catia drafting. I can't remember if there is something else to check in catia beside in tools/options - General/Display/Thickness&Font where I have checked...
Hi,
my issue is probably not related directly to catia, but it is most noticeable in it's environment...
So, I'm experiencing in certain cases and area very noticeable part of screen "frequency" or "flickering", for example on print screen below, areas that are bright yellow and half...
I would need to modify post processor so in header would be an additional line with text in square brackets. Problem is that adding Text block doesn't work because of brackets, so question is how define output in the way it would output with that necessary [ ] ?
For example, output line should...
It might help if I paste entire macro code, so you can test it (bottom third is where body delete should happen):
Sub CATMain()
Dim i, n As Integer
Dim name, prt As String
Dim BodyName() As String
Dim partDocument1 As PartDocument
On Error Resume Next
Set partDocument1 =...
I tried this way, as default (empty) body name is always the same, but also nothing happened...
sel.Add part2.Bodies.Item("Body.1")
sel.Delete
sel.Clear
I managed to "convert" newly pasted body to Part Body:
Set partDocument2 = CATIA.ActiveDocument
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set part2 = partDocument2.Part
sel.Add part2
sel.PasteSpecial ("CATPrtResult")
part2.MainBody = part2.Bodies.Item(2)
part2.Update
now I would...
Hi,
I have macro which generates parts (and assembly of new parts) from each body in multy-body part, but they are pasted as normal (second) body. What would like is that this new (pasted) body would be Part Body. any ideas?
I have had some old .catvba files containing macros (from B19) and those didn't work in B25 straight away, what I did now is create new .catvba, create and copy/pase codes to newly created macros and it works ...
I tried with this (under admin)
C:\Program Files\Dassault Systemes\B##\Win_b64\Code\bin\CNEXT.exe /unregserver
and
C:\Program Files\Dassault Systemes\B25\Win_b64\Code\bin\CNEXT.exe /regserver
but still macros doesn't work... also there was no previous version of catia on this computer it's...
It might be a common problem, couldn't find solution. So, as fresh install was needed (B25), now I can't get to run even a simple code like this:
Sub CATMain()
Dim RootProduct As Product
Set RootProduct = CATIA.ActiveDocument.Product
MsgBox RootProduct.Name
End Sub
I'm...
Is there a way to access part (instances) numbering via macro? I would like to customize numbering of parts (instances) and this numbers will also be used then for balloon creation in drafting.
I'm heaving similar problem, and can't find an example of using DMUClashPreview, which I would like to use for opening interference window with results at the end of my macro for checking for collisions between parts.