Glad to see that I'm at least thinking in the similar direction as someone else. One thing that I tried in addition to your pointers is to OpenEdition of the drawingview.factory2D.parent (sketch) and create two lines on desired spot. I realize that drawingview.factory2D.parent.OpenEdition equals...
Hi,
can anyone help me with automating "Multiple broken views" in same direction. I would like to get this with vba::
The code seems to break when it gets to creating second BrokenView
Sub CATMain()
Dim drawingDocument1 As DrawingDocument
Set drawingDocument1 = CATIA.ActiveDocument
Dim...
The idea is to check the name of first constraint inside newly inserted subassembly. If the product is flexible, all the constraint names inside it get index ".1". Ergo if a constraint name inside certain product instance is different from the name of the same constraint inside given...
Well I must say that the reason why the upper code does not work, is beyond me. You could try to replace next line in code:
CATIA = GetObject(vbNullString, "CATIA.Application")
with
CATIA = System.Runtime.InteropServices.Marshal.GetActiveObject("CATIA.Application")
or check in this...
try with this ...
Imports INFITF
Imports DRAFTINGITF
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim CATIA As Application
Try
CATIA = GetObject(vbNullString, "CATIA.Application")
Catch ex As Exception...
Not at my pc at the moment. I'm writing from mobile so it's hard for me to check your second code. As I wrote earlier, your first thread Code worked for me with only this two references.
- CATIA V5 DraftingInterfaces Object Library
- CATIA V5 InfInterfaces Object Library
The important thing is...
You could check it with something like this::
Dim constraints1 As Constraints
Set constraints1 = oProd.ReferenceProduct.Connections("CATIAConstraints")
Dim constraints2 As Constraints
Set constraints2 = oProd.Connections("CATIAConstraints")
Dim constraint1 As Constraint
Dim constraint2 As...
Hmmmm... I used to play with a similar solution (not exactly same but similar). I came upon a "problem" that an user can create multiple attribute links of "same value" - if the script is initialized multiple times. That's why I decided to delete old text and recreate it with attribute link and...
R u sure that you have active Catia instance and your active doc in this Catia is DrawingDocument? Your code works fine in right setup (First Catia instance has DrawingDocument as Active document). For any other setup you have to handle errors that occur.
Hello.
I have one question. Does anyone use kwe_contextual links? Until recently this kind of links sounded to me like oxymoron. Now I have a case where I have to extract some KWE values from one assembly to several others. The source assembly must be exchangeable. Here I have two scenarios...
@tesak
Hi
since you already helped me with the VBA->VBScipt conversion once, i'd like to ask you one more question. I'm getting an error message for this code in VBS:
Set osel = CATIA.ActiveDocument.Selection
dim InputObjectType(0)
Dim status
InputObjectType(0) = "AxisSystem"
osel.Clear...
Believe it or not, but we have the same approach at the moment. But we had some bad experiences with it (second quote) when we tried to test ENOVIA on our models. Dassault experts said that this is one of the reasons why we are having so much glitches and that is the reason we are trying a...
Hmmm. That is a very interesting approach indeed. But this way of solving my problem would mean that we have to make new file/s every time we put a standard part or assembly in new project. For first, those files wouldn't have the same UUID as the originals. Starting from the fact that we do not...
Hello.
I have a little problem that I'm stuck with. So here's the thing. We do not use any professional PDM platform in our office, so I'm not familiar with any of their solutions for my problem. I'm trying to make a library of standard parts on network that would be used in different projects...
Thanks for the quick reply. I've learned something new from it but unfortunately the error remains with a little difference.
oView as DrawingView, oLength as Length
Dim drawingViewGenerativeBehavior1
Set drawingViewGenerativeBehavior1 = oView.GenerativeBehavior
Dim visine()
ReDim visine(1...