Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

VBA Scripts and Solid EDGE?

Status
Not open for further replies.

ryandias

Automotive
Jul 28, 2006
197
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))
 
Replies continue below

Recommended for you

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
 
You lost me there. What is the Object Browser :-(
 
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
 
i have no idea what RMB means?

or a.s.o.??
 

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 ;-))

dy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor