×
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

VBA Scripts and Solid EDGE?

VBA Scripts and Solid EDGE?

VBA Scripts and Solid EDGE?

(OP)
So i am trying to create a rendering in solid edge by entering data in a table in MS excel.

I have written the script to position all the components as necessary, but now need to make Solid Edge 18, Save As Image.

I have a variable name for the Jpg file and don't know how to call the function?  Anyone know??



some examples of code i used to move parts is
Call objTemp.Move(Information(i, 3) / 1000, Information(i, 4) / 1000, 0)

and to add parts
Set objTemp = objOccurrences.AddByFilename(Information(i, 2))

RE: VBA Scripts and Solid EDGE?

Hi,

one solution misgt be this:

' window data
Dim dUseWidth As Double
Dim dUseHeight As Double
Dim dScale As Double

    dScale = 1#
    dUseHeight = objSEApp.ActiveWindow.UsableHeight * dScale
    dUseWidth = objSEApp.ActiveWindow.UsableWidth * dScale

    ' objDoc --> objSEapp.ActiveDocument
    NewFilename = Left(objDoc.FullName, Len(pDoc.FullName) - 3) & "jpg"

    If objDoc.Type <> igDraftDocument Then
        Call objSEApp.ActiveWindow.View.SaveAsImage(NewFilename, dUseWidth, dUseHeight, , , , seImageQualityHigh)
    Else
        Call objDoc.Windows.Item(1).SaveAsImage(NewFilename, dUseWidth, dUseHeight, , , , seImageQualityHigh)
    End If


See the object browser for details on SaveAsImage

dy

RE: VBA Scripts and Solid EDGE?

(OP)
You lost me there.  What is the Object Browser sad

RE: VBA Scripts and Solid EDGE?

Hi,

when in VBA coding (ALT+F11) do an RMB ther will be an
entry Object Browser which will enable you to look at
the Objects/Methods a.s.o.

dy

RE: VBA Scripts and Solid EDGE?

(OP)
i have no idea what RMB means?

or a.s.o.??

RE: VBA Scripts and Solid EDGE?


RMB --> right mouse button
a.s.o --> and so on
a.s.f --> and so forth
IPC --> insert part copy
FOA --> familiy of assemblies
FOP --> familiy of part


ymmv --> your miles may vary winky smile)

dy

RE: VBA Scripts and Solid EDGE?

(OP)
HAHA.. 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