Welcome to the COE Discussion Forums! 

 

To participate in the discussion forum, you must be logged in to the website.  If you forget your login information, please contact COE Headquarters at coe@coe.org or (800) 263-2255.

If you are new to the COE Discussion Forum and would like to participate, please register.


COE Community News

Follow COE on

COE DISCUSSION FORUM
Catvbs
Last Post 09 Nov 2009 08:00 PM by GVAN. 9 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
PARAUJO
New Member
New Member
Posts:13

--
06 Nov 2009 05:36 PM  

 Hello All,

I'm doing some tests and one of them is count the number of products or parts into a product.

In my search I found this:

 

 

 

Property Products() As CATIAProducts (Read Only)

Returns the collection  of products contained in the current product.

Dim EngineChildren As Products

Set EngineChildren = Engine.Products

 

 

 

And I'm trying to check that value with a MsgBox, but I got an error with the MsgBox, because it doesn't give support for that parameter or method.

So, my first question is:

1- What is a Read-Only parameter? And where is necessary use it?

2 - There is a way to check that value (Number of Products) in a MsgBox?

Thank You Very Much,

 

MBERRY
Basic Member
Basic Member
Posts:470

--
06 Nov 2009 05:49 PM  
Paulo,

The "Products" property returns a Products object type, not a value. That products object type has a Count property that will tell you the number of products you are looking for.

Example for the top level product that is open
Msgbox CATIA.Activedocument.Product.Products.Count

-Mike
PARAUJO
New Member
New Member
Posts:13

--
06 Nov 2009 05:55 PM  

Hi Make,

Now I understood, and it works very well!

Thank you very much

 

PARAUJO
New Member
New Member
Posts:13

--
06 Nov 2009 06:10 PM  

Mike,

Please, I'm needing the product position of these products that are into the main product.

I' trying to use the property "Position", but I checked that it doesn't return a value.

Is this possible, to take the coordinates of a product by catvbs?

Thank you very much

MBERRY
Basic Member
Basic Member
Posts:470

--
06 Nov 2009 06:17 PM  
Search this forum. This has previously been discussed too many times to count....

-Mike
MBERRY
Basic Member
Basic Member
Posts:470

--
06 Nov 2009 06:19 PM  
I just noticed this post is in the KBE forum. All programming related topics belong in the Develop & Deploy forum. Search that forum for the answer.

-Mike
PARAUJO
New Member
New Member
Posts:13

--
06 Nov 2009 06:20 PM  

Ok, I'll search it.

Thank You

GVAN
Basic Member
Basic Member
Posts:128
Avatar

--
09 Nov 2009 07:15 PM  

Hey Mike,

Maybe we need an updated subtitle for this forum? I am sooo joking. I couldn't resist...

MBERRY
Basic Member
Basic Member
Posts:470

--
09 Nov 2009 07:42 PM  
Hi Gord,

Ha! I hear ya...but all jokes aside, I would bet you the average person who has a question about powercopies, a formula, knowledgeware, etc. has never heard of the term Knowledge Based Engineering! Or if they have heard the term, they wouldn't know those questions belong in this forum. Only us geeks that do it for a living probably make the connection! So we could probably add a more descriptive subtitle on this forum too...

-Mike
GVAN
Basic Member
Basic Member
Posts:128
Avatar

--
09 Nov 2009 08:00 PM  
Geeks? Well, I just checked, and I guess the shoe fits. I needed a laugh though...
You are not authorized to post a reply.

Active Forums 4.1