×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

CATIA V5 VBA (selection command)

CATIA V5 VBA (selection command)

CATIA V5 VBA (selection command)

(OP)
hi,
I'm a starter to VBA in CATIA V5 and im using Nick Weisenberger's material. while coming across selection command i experienced run time error

Sub CATMain()
'display the path name of the file
Dim doc1 As Document
Set doc1 = CATIA.ActiveDocument
MsgBox doc1.FullName

'display the no. of selection
Set doc1 = CATIA.ActiveDocument
MsgBox doc1.Selection.Count

Dim part_1 As Object
Set part_1 = CATIA.ActiveDocument

'display the selected document
Dim objectsel As Selection
Set objectsel = CATIA.ActiveDocument.Selection
objectsel.Clear
objectsel.Add (part_1)

End Sub

the error was
run-time error '438'
object doesn't support this property or method
Object doesn't support this property or method (Error 438)


Not all objects support all properties and methods. This error has the following cause and solution:

You specified a method or property that doesn't exist for this Automation object.
See the object's documentation for more information on the object and check the spellings of properties and methods.

You specified a Friend procedure to be called late bound.
The name of a Friend procedure must be known at compile time. It can't appear in a late-bound call.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).



if any one could help me with explanation and solution it would of great help

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources