From: "Jean Marc" jean-marc.brun -at- on
Newbie on all these matters:
I am trying to write a macro that change on existing drawings all tangent
edges from "visible" to "with a style" -SetDisplayTangentEdges2 1- (not
sure how it is said in English), and some other things.

Anyway I got that:

'
******************************************************************************
' C:\WINDOWS\Temp\swx3648\Macro1.swb - macro recorded on 07/12/06 by
jmbrun18
'
******************************************************************************
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
boolstatus = Part.ActivateView("Vue de mise en plan1")
boolstatus = Part.Extension.SelectByID2("Vue de mise en plan1",
"DRAWINGVIEW", 0.1920120113314, 0.09432764872521, 0, False, 0, Nothing, 0)
Part.SelectionManager.GetSelectedObject3(1).SetDisplayTangentEdges2 1
....

End Sub


From that point, what do I need to keep on that code, and how to select all
the views to change them

TIA

JM


From: Tin Man on
There is an example macro included with SW2006 that should do you what
you're asking for, it's called "Activate Each View on Current Sheet
Example (VB)".

Also, if you're unfamiliar with the API help, it is in SolidWorks under
the Help menu...you want to choose "SolidWorks and Add-Ins API Help
Topics".

And a good place to go for example macros is the API Help (mentioned
above), Contents tab, SolidWorks API Help/Examples and Projects/Visual
Basic(VB) Examples and the examples are ordered alphabetically. For the
macro I mentioned in the first sentence of this post...I looked under D
for Drawings and it was right there.

Ken

From: "Jean Marc" jean-marc.brun -at- on

"Tin Man" <sendspamhere_001(a)yahoo.com> a ?crit dans le message de news:
1152745030.595368.306990(a)35g2000cwc.googlegroups.com...
> There is an example macro included with SW2006 that should do you what
> you're asking for, it's called "Activate Each View on Current Sheet
> Example (VB)".
>
> Also, if you're unfamiliar with the API help, it is in SolidWorks under

Thanks for the answer, couldn't make things work. Will do it manualy.


 | 
Pages: 1
Prev: Floworks
Next: 3-D Sketch Tutorial