Discuss (large)

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.


 

Follow COE on

COE DISCUSSION FORUM
Catvbs
Last Post 09 Nov 2009 02:00 PM by GVAN. 9 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
PARAUJO
Occasional Poster
Occasional Poster
Posts:14


--
06 Nov 2009 11:36 AM  

 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,

 

Best Regards,

Paulo Araujo
MBERRY
500+ Poster
500+ Poster
Posts:584


--
06 Nov 2009 11:49 AM  
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
Increase your CATIA V5 programming skills
v5vb.wordpress.com
PARAUJO
Occasional Poster
Occasional Poster
Posts:14


--
06 Nov 2009 11:55 AM  

Hi Make,

Now I understood, and it works very well!

Thank you very much

 

Best Regards,

Paulo Araujo
PARAUJO
Occasional Poster
Occasional Poster
Posts:14


--
06 Nov 2009 12: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

Best Regards,

Paulo Araujo
MBERRY
500+ Poster
500+ Poster
Posts:584


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

-Mike
Increase your CATIA V5 programming skills
v5vb.wordpress.com
MBERRY
500+ Poster
500+ Poster
Posts:584


--
06 Nov 2009 12: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
Increase your CATIA V5 programming skills
v5vb.wordpress.com
PARAUJO
Occasional Poster
Occasional Poster
Posts:14


--
06 Nov 2009 12:20 PM  

Ok, I'll search it.

Thank You

Best Regards,

Paulo Araujo
GVAN
50+ Poster
50+ Poster
Posts:130
Avatar


--
09 Nov 2009 01:15 PM  

Hey Mike,

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

Gord Vander Vliet
Enterprise Tool & Die
MBERRY
500+ Poster
500+ Poster
Posts:584


--
09 Nov 2009 01: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
Increase your CATIA V5 programming skills
v5vb.wordpress.com
GVAN
50+ Poster
50+ Poster
Posts:130
Avatar


--
09 Nov 2009 02:00 PM  
Geeks? Well, I just checked, and I guess the shoe fits. I needed a laugh though...
Gord Vander Vliet
Enterprise Tool & Die
You are not authorized to post a reply.

Active Forums 4.1