Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Function or Interface marked as restricted

Status
Not open for further replies.

Thosnow

Aerospace
Joined
Feb 23, 2017
Messages
68
Location
CA
Hi All,

Using a VBA code, I am trying to create a "Text Stamp" on an annotated view and get an error message at "Add2DText" as seen below.

Capture_aocfaz.jpg


Do you know what it is?
How do I fix it?

I check the function "Add2DText" in Catia and it seems Add2DText is a valid property of Marker2D.

Thank you for your help in advance

Quin
 
Any time you send (or receive) an array from a CATIA API call, this error will be produced. In the case of VBA, you will need to declare the object calling the method (.Add2DRectangle in this case) as a variant (no explicit type declaration).

For your example:

Dim Marker2Ds as Marker2Ds should be changed to: Dim Marker2Ds

--Doug
 
Thanks Doug. I changed to Dim Marker2Ds and the error message does not come up.

Quin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top