Aktivate sketch after creation

Aktivate sketch after creation

j_weber
Mentor Mentor
342 Views
3 Replies
Message 1 of 4

Aktivate sketch after creation

j_weber
Mentor
Mentor

Good morning everybody

 

I've create me a little code by search, copy and paste from postings here because I'm not a programmer. 

 

'   'Set a reference to the part dokument       

Dim oDoc As Inventor.Document       

oDoc = ThisDoc.Document               

 

' Set a reference to the component definition.   

Dim oCompDef As PartComponentDefinition   

oCompDef = odoc.ComponentDefinition     

 

 ' Create a new sketch on the X-y work plane.     

 Dim oSketch As PlanarSketch    

oSketch = oCompDef.Sketches.Add(oCompDef.WorkPlanes(3))       

 

It creates me a sktech on the XY-Plane. 

Is it possible to activate the sketch directly after creation. 

 

 

Thanks and nice day

 

 




Jörg Weber
CAD Systemtechniker für AutoCAD, Inventor, Vault





0 Likes
Accepted solutions (1)
343 Views
3 Replies
Replies (3)
Message 2 of 4

bradeneuropeArthur
Mentor
Mentor
Accepted solution

this is how:

oSketch.edit

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 4

j_weber
Mentor
Mentor

Thanks a lot. 

 

Life can be so easy

 

Hope i can learn it for myself

 

by




Jörg Weber
CAD Systemtechniker für AutoCAD, Inventor, Vault





0 Likes
Message 4 of 4

bradeneuropeArthur
Mentor
Mentor
Sure........

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes