Advertisement
AL4ST4I2

Untitled

Feb 8th, 2020
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. Public Sub main()
  2.  
  3.     Debug.Print ThisApplication.Caption
  4.    
  5.     Dim activeDoc As PartDocument
  6.     Set activeDoc = ThisApplication.ActiveDocument
  7.    
  8.     Dim sketches As Sketch
  9.     Set sketches = activeDoc.ComponentDefinition.sketches.Item(1)
  10.    
  11.     Dim sketchLines As sketchLines
  12.     Set sketchLines = sketches.sketchLines
  13.    
  14.     Dim transGeom As TransientGeometry
  15.     Set transGeom = ThisApplication.TransientGeometry
  16.    
  17.     Dim sketchesEnum As SketchEntitiesEnumerator
  18.     Set sketchesEnum = sketchLines.AddAsTwoPointCenteredRectangle(transGeom.CreatePoint2d(0, 0), transGeom.CreatePoint2d(4, 4))
  19.    
  20.    
  21. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement