Eng-Tips is the largest forum for Engineering Professionals on the Internet.

Members share and learn making Eng-Tips Forums the best source of engineering information on the Internet!

  • Congratulations JStephen on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Product Coordinates

  • Thread starter Thread starter saravanakumar.r
  • Start date Start date
S

saravanakumar.r

Guest
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!
 

Part and Inventory Search

Sponsor

Back
Top