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))
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?
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?
RE: VBA Scripts and Solid EDGE?
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?
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
dy
RE: VBA Scripts and Solid EDGE?