API help

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

Reply to
Jean Marc
Loading thread data ...

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

Reply to
Tin Man

"Tin Man" a écrit dans le message de news: snipped-for-privacy@35g2000cwc.googlegroups.com...

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

Reply to
Jean Marc

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.