Continue to Site

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.

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
 
Hi,
you could try something like this:

dim pVar
set pVar = ProductPos

pVar.GetComponents iAxisComponentsArray


this works for me usually.

Best regards!
 

Sponsor

Articles From 3DCAD World

Back
Top