×
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

SWAPI, openning and closing part files

SWAPI, openning and closing part files

SWAPI, openning and closing part files

(OP)
I am writing a macro that reads and writes custom information to a drawing file (.slddwg).  One piece of the information in the drawing file is in the part/assembly file.  So the macro has to get the information from the drawing file and paste it in the drawing file.  I have two cases to deal with 1) the part/assembly file is open and the macro simply gets the information and paste it on the drawing.  2) the part/assembly file is closed and stored in a harddrive someplace.  Now the macro has to open the file get the information then close the file.  Case 1 I have already solved.  In case two I need to get the file name (part/assembly) so that I can open it.  The rest is pretty much the same as case 1.  Both files will always be in the same directory so that narrows the search down considerably.  

Please give me some ideas on how to get the file name so that I can open it extract the information then close it.  

Thanks

RE: SWAPI, openning and closing part files

Hi

you can use ModelDoc2::GetDependencies2 to get the part/assembly file name and path from the drawing.

RE: SWAPI, openning and closing part files

(OP)
Thank you.

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