Hi
I've been tring to reload a sheet format using the API but it doesn't
appear to work - no error messages just doesn't do it . What am I
missing?
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Part.SetupSheet4 "Sheet1", 6, 12, 1, 1, False,_
"G:\SolidWorks\Sheet Formats\STA4 2004.slddrt", 0.297, 0.21,
"Default"
Part.EditSketch
End Sub
Cheers
Craig
|
|
0
|
|
|
|
Reply
|
swatoscmar
|
11/4/2004 3:55:10 AM |
|
I think your paper size constants are wrong
Your code
Part.SetupSheet4 "Sheet1", 6, 12, 1, 1, False,_
> "G:\SolidWorks\Sheet Formats\STA4 2004.slddrt", 0.297, 0.21,
My code that works
Part.SetupSheet4 "Sheet1", 1, 1, 1, 1, False, "B portrait.slddrt", 0.297,
0.21, "Default"
Look in the swconst.bas for details on the constants. Also it may cause
problems to split the code line.
If the sheet name is different i.e. "sheet 2" the code would not work.
Goood luck
Warren
"Craig T" <swatoscmar@yahoo.co.nz> wrote in message
news:6638b876.0411031955.97e9240@posting.google.com...
> Hi
>
> I've been tring to reload a sheet format using the API but it doesn't
> appear to work - no error messages just doesn't do it . What am I
> missing?
>
> Dim swApp As Object
> Dim Part As Object
> Dim boolstatus As Boolean
> Dim longstatus As Long
> Dim Annotation As Object
> Dim Gtol As Object
> Dim DatumTag As Object
> Dim FeatureData As Object
> Dim Feature As Object
> Dim Component As Object
> Sub main()
>
> Set swApp = Application.SldWorks
>
> Set Part = swApp.ActiveDoc
> Part.SetupSheet4 "Sheet1", 6, 12, 1, 1, False,_
> "G:\SolidWorks\Sheet Formats\STA4 2004.slddrt", 0.297, 0.21,
> "Default"
> Part.EditSketch
> End Sub
>
> Cheers
>
> Craig
|
|
0
|
|
|
|
Reply
|
Warren
|
11/4/2004 4:21:23 PM
|
|
'this has been tested and it works. make sure STA4 2004.slddrt is in folder
'G:\SolidWorks\Sheet Formats.
'hope this helps you out.
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim Part As Object
Sub main()
Set swApp = New SldWorks.SldWorks
Set Part = swApp.ActiveDoc
Part.SetupSheet4 "Sheet1", 6, 12, 1, 1, False, _
"G:\SolidWorks\Sheet Formats\STA4 2004.slddrt", _
0.297, 0.21, "Default"
Part.EditSketch
End Sub
swatoscmar@yahoo.co.nz (Craig T) wrote in message news:<6638b876.0411031955.97e9240@posting.google.com>...
> Hi
>
> I've been tring to reload a sheet format using the API but it doesn't
> appear to work - no error messages just doesn't do it . What am I
> missing?
>
> Dim swApp As Object
> Dim Part As Object
> Dim boolstatus As Boolean
> Dim longstatus As Long
> Dim Annotation As Object
> Dim Gtol As Object
> Dim DatumTag As Object
> Dim FeatureData As Object
> Dim Feature As Object
> Dim Component As Object
> Sub main()
>
> Set swApp = Application.SldWorks
>
> Set Part = swApp.ActiveDoc
> Part.SetupSheet4 "Sheet1", 6, 12, 1, 1, False,_
> "G:\SolidWorks\Sheet Formats\STA4 2004.slddrt", 0.297, 0.21,
> "Default"
> Part.EditSketch
> End Sub
>
> Cheers
>
> Craig
|
|
0
|
|
|
|
Reply
|
sldprt
|
11/4/2004 5:01:09 PM
|
|
Found my problem, the sheet format file name must be different from
the existing one to trigger a reload. (I was trying to reload the old
sheet format again). If
you want to do that you can use
Sheet.SetTemplateName "Some dummy name"
Part.SetupSheet4 "Sheet1", 6, 12, 1, 1, False, _
"Old sheet format file and path", _
0.297, 0.21, "Default"
Craig
sldprt@hotmail.com (Sean Phillips) wrote in message news:<edcc2afe.0411040901.4bd488a5@posting.google.com>...
> 'this has been tested and it works. make sure STA4 2004.slddrt is in folder
> 'G:\SolidWorks\Sheet Formats.
>
> 'hope this helps you out.
>
> Option Explicit
>
> Dim swApp As SldWorks.SldWorks
> Dim Part As Object
>
> Sub main()
>
> Set swApp = New SldWorks.SldWorks
> Set Part = swApp.ActiveDoc
> Part.SetupSheet4 "Sheet1", 6, 12, 1, 1, False, _
> "G:\SolidWorks\Sheet Formats\STA4 2004.slddrt", _
> 0.297, 0.21, "Default"
> Part.EditSketch
> End Sub
>
>
>
> swatoscmar@yahoo.co.nz (Craig T) wrote in message news:<6638b876.0411031955.97e9240@posting.google.com>...
> > Hi
> >
> > I've been tring to reload a sheet format using the API but it doesn't
> > appear to work - no error messages just doesn't do it . What am I
> > missing?
> >
> > Dim swApp As Object
> > Dim Part As Object
> > Dim boolstatus As Boolean
> > Dim longstatus As Long
> > Dim Annotation As Object
> > Dim Gtol As Object
> > Dim DatumTag As Object
> > Dim FeatureData As Object
> > Dim Feature As Object
> > Dim Component As Object
> > Sub main()
> >
> > Set swApp = Application.SldWorks
> >
> > Set Part = swApp.ActiveDoc
> > Part.SetupSheet4 "Sheet1", 6, 12, 1, 1, False,_
> > "G:\SolidWorks\Sheet Formats\STA4 2004.slddrt", 0.297, 0.21,
> > "Default"
> > Part.EditSketch
> > End Sub
> >
> > Cheers
> >
> > Craig
|
|
0
|
|
|
|
Reply
|
swatoscmar
|
11/14/2004 11:58:43 PM
|
|
|
3 Replies
402 Views
(page loaded in 0.145 seconds)
Similiar Articles: Class for load 3d model in obj format - comp.graphics.api.opengl ...Reloading Sheet format with API - comp.cad.solidworks how to load jpg file for beginner - comp.graphics.api.opengl ... Class for load 3d model in obj format - comp ... Loading stl file in openGL - comp.graphics.api.openglReloading Sheet format with API - comp.cad.solidworks Shading problem - comp.graphics.api.opengl I load them from an STL file. So, when I read the data ... ... are the ... FTGL font engine - comp.graphics.api.openglFTGL allows you to create various types of text - bitmaps, pixmaps, polygon, outline etc, with a simple API call such as the following: font = new FTGLPixmapFont ... Generating excel sheets through JSP - comp.lang.java.programmer ...Reloading Sheet format with API - comp.cad.solidworks JPEG of Drawing (idw) through Inventor API ... Please help: Tagset.ExcelXP Help - Excel cannot open workbook ..... am ... Import a CAD PLatform to Simmechanics - comp.soft-sys.matlab ...Reloading Sheet format with API - comp.cad.solidworks Importing a 3D model of a Printed Circuit Board - comp.cad ...-Michael Tom Page wrote: > I am trying to find ... Importing a 3D model of a Printed Circuit Board - comp.cad ...Reloading Sheet format with API - comp.cad.solidworks Importing a 3D model of a Printed Circuit Board - comp.cad ...-Michael Tom Page wrote: > I am trying to find out ... Does directio(fd, DIRECTIO_ON) survive the file descriptor? - comp ...Reloading Sheet format with API - comp.cad.solidworks Does directio(fd, DIRECTIO_ON) survive the file descriptor? - comp ... The directio(3C) man page says "The advice ... How to update K-Factor through API - comp.cad.solidworks ...... GetCustomBendAllowance Debug.Print "PROCESS SHEET METAL ... 3D size(thisFrame); end % Update user ... for load 3d model in obj format - comp.graphics.api ... TGA /BMP to RGBA - Newbie - comp.graphics.api.opengl... im using Openil/Devil under delphi I just wanna load a ... I don't know what TXT is, when it comes to image formats. ... TGA /BMP to RGBA - Newbie - comp.graphics.api.opengl Hi ... Transparency of BMP image pixels - comp.graphics.api.opengl ...There are free image libraries to load these format like LibPNG http://www.libpng.org ... > No, OpenGL is a rendering API not an image > manipulation API. > Maybe you ... SolidWorks 3D CAD products - API to reload sheet templateFrom time to time the company sheet formats get ... At this time, the only API workaround I can figure out is to tell SW to load a completely different format, then load ... .load() – jQuery APIExample: Load the main page's footer navigation into an ordered ... afterwards ((ie: loading something your use a template ... Browse the jQuery API 7/23/2012 8:07:31 AM
|