I appreciate for your advices. I'm just a mechanical engineer, I haven't even learned programming language with any formal classes. These days I'm falling in learning to make a code step by step personally. Because it's very helpful for my work.
If I put time, effort, and know-how into my code, I think it's well worth it. And that doesn't mean material things. And I would like to protect it from another person.
Hi, little Cthulhu
are you sure that VB.NET is x10-x100 slower? I think that it's true that vb is slower, but not 10 or 100 times. And I do not want code to leak. Is there any way to protect your scriptcode?
I understand that loop, but only that center graph doesn't work, when I change it to fit all in or hide and show command, then it works. That is what I didn't understand.
of course, before I post here, I tried to search it in google first, and here also.
And I tried to all code with startcommand "center graph", but there is no good result.
Hello all,
Here is an example of CATIA.Startcommand that I found on the internet.
I tested in the part design workbench then it sometimes(?) works.
I mean that after I reopen a catia instance, it works.
But when I use it 2 or more, it doesn't work any more..
And in assembly work bench I could...
I used CATScript also for a test fastly. Actually I'm making code in VB.NET Visual Studio. Because I have learned that the CATScript or VBA are not safe for my code. That is reason why I use VB.NET. I know that there is a function of Obfuscate in CATScript. But that is also not safe.
Thank you for your information.
I didn't know that SelectElement doesn't support FOR EACH.
Okay, then I have to try to use the Product.Products collection, after I open new window a product what I want.
Is there any another way?
Hello All,
I learn CATIA VBA step by step and now I have a small question.
Before I make VBA in CATIA, I usually tried to use FOR EACH Loop in Excel VBA.
Because as far as I know, FOR EACH Loop is faster and lighter than FOR Loop.
And I think that when I use FOR EACH Loop in a huge assembly that...
@Manuel Pimenta
Thank you for your reply, but I couldn't find a solution from your suggestion.
Otherwise I used open new window function, then it works for me well.
@Little Cthulhu
Thank you for your reply, I tried to use your suggestion in my code, but I got an error.
I add on error resume...
Thank you for your interesting.
Because I had already made a macro for a stock size all of products.
But it is very slow, when I have so many parts.
Normally my project has more than 500 parts, sometimes 1000 parts.
Actually I don't need to make in all parts.
That reason why I tried to make with...
Hi, Lucas
Thank you for your answer.
I had similarly thought your code also before.
I tried to change a name of geo set and search it in all parts.
This is my last solution ;-)
Just, I would like to know another way to hide without selection.
I have already searched about ".VisProperties" in VB...
Hello,
I'm making a simple script that creates a geometrical set and hide it in selected parts.
The problem is, when I use both "SelectElement3" methode and "VisProperties" methode,
I have to add geo set and clear selection it.
Then I would like to know, whether there is a way to hide a geo set...