Where to find variants in the API?

Where to find variants in the API?

aelqabbany
Advocate Advocate
705 Views
2 Replies
Message 1 of 3

Where to find variants in the API?

aelqabbany
Advocate
Advocate

Hi,

 

When an Inventor API method lists a variant as an argument, where can I go to see my different options?

 

Usually I can click on the object/enum name and I am sent to a page that shows me my different options.

 

Here are two examples:

https://help.autodesk.com/view/INVNTOR/2020/ENU/?guid=GUID-1CDF9F9D-A4E5-4961-B518-D7166F6A082E

Drawing view variants.png

 https://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-5BFD1ED3-6003-491C-A197-22624521E960

Geometry variants.png

 

Thanks

0 Likes
Accepted solutions (2)
706 Views
2 Replies
Replies (2)
Message 2 of 3

Michael.Navara
Advisor
Advisor
Accepted solution

Hi,

VBA documentation says:

The Variant data type is the data type for all variables that are not explicitly declared as some other type (using statements such as Dim, Private, Public, or Static).

 

See the link below for more info

https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/variant-data-type

 

In your cases the scale can be string (for example: "1:5") or double ( 0.2 ). 

In the second case the possible values are described in description column. Possible types can be PointIntentEnumPoint2d or double

Message 3 of 3

WCrihfield
Mentor
Mentor
Accepted solution

That 'Variant' Type is still available for use within VBA, but has been discontinued within VB.NET (which is what iLogic uses), in favor of the 'Object' Type.  So, basically anywhere you see it requesting a variable of 'Variant' Type, just substitute 'Object' Type in its place, when working in iLogic or VB.NET.

https://docs.microsoft.com/en-us/dotnet/visual-basic/misc/bc30804 

 

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.

If you want and have time, I would appreciate your Vote(s) for My IDEAS 💡or you can Explore My CONTRIBUTIONS

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes