What's new

Built-in-Function Question

kyleborot

Member
Hello,

I seem to be running into issues regarding the built in functions of the IADCurve interface. According to the API Help, the Tangent method of the IADCurve interface returns IADVector, but trying to access the properties of that object throws back an error.

Python:
x = design_session.Bodies.Item(0).Edges.Item(l).Geometry.Tangent.X #getting x from IADVector Properties
print(x)

AttributeError: 'builtin_function_or_method' object has no attribute 'X'
1719238007718.png
Anyone know of a solution?
 

stepalibre

Alibre Super User
Can you share your complete script? The doc you pasted is from AlibreX not Alibre Script. Are you using AlibreX, Alibre Script or both in the same script?
 

NateLiquidGravity

Alibre Super User
Simply put IADCurve.Tangent is a method that requires you to pass in a double (which I assume is a decimal value from 0.0 to 1.0) indicating how far along the curve you want to find a tangent point.
So assuming you got design_session correctly then for a tangent point half way along the curve you would have to do something like this:
Python:
x = design_session.Bodies.Item(0).Edges.Item(l).Geometry.Tangent(0.5).X
But I haven't tested it.
 

kyleborot

Member
Can you share your complete script? The doc you pasted is from AlibreX not Alibre Script. Are you using AlibreX, Alibre Script or both in the same script?
Unfortunately I can't share the whole script since this is for my company and I am not at liberty to share it all. What I can tell you is that I am using AlibreX.
 
Top