Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Register Log in

Product Coordinates

saravanakumar.r

New member
Hello,

Programmatically how to extract the coordinates(X,Y,Z &
Angles) of all the children of a product.

I am using the below code. But an error comes as below
shown image.

For i = 1 To Products.Count

Dim Product As Product
Set Product = Products.Item(i)

Dim ProductPos As Position
Set ProductPos = Product.Position

Dim iAxisComponentsArray(11)
ProductPos.GetComponents iAxisComponentsArray

Next i

Error Msg:

View attachment 1
 

neso

New member
Hi,
you could try something like this:

dim pVar
set pVar = ProductPos

pVar.GetComponents iAxisComponentsArray


this works for me usually.

Best regards!
 

Sponsor

Top