×
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

Solid Works Macro part.SaveAs2

Solid Works Macro part.SaveAs2

Solid Works Macro part.SaveAs2

(OP)
OK, I think that with an example it will be clear:

t = Time
str1 = Str(t)
str2 = "C:\copy[" & str1 & " ].SLDPRT"
Part.SaveAs2 str2, 0, False, False

OK that doesn't work though checked with the QuickWatch and Str2 is a string and maches what I want. Such is this that if I change str2 = "C:\copy[ str1 ].SLDPRT"

it does save it with the new name.

Can somebody post me with what might be wrong?
 

RE: Solid Works Macro part.SaveAs2

What is an example of the desired str2?  If it is coverting it to a time, 12:45 for example, you will run into a problem with Windows based macines as the : character is not allowed in file names.

Eric

RE: Solid Works Macro part.SaveAs2

(OP)
Thanks a lot. Yep that must be it. Thats propably why Date doesn´t work either "/" in 01/08/06


Once again thanks.

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