Does anyone happen to have some code that allows me to project geometry using window selection? I want to project a lot of lines from one sketch to another which is quite tedious when I have to click each line separately. Especially because these lines are all on top of construction lines that I don't want to project. But this means I have to use select other half of the time.
Solved! Go to Solution.
Does anyone happen to have some code that allows me to project geometry using window selection? I want to project a lot of lines from one sketch to another which is quite tedious when I have to click each line separately. Especially because these lines are all on top of construction lines that I don't want to project. But this means I have to use select other half of the time.
Solved! Go to Solution.
Solved by JelteDeJong. Go to Solution.
you can try this. Run this rule. Select the original sketch in your browser then select the target sketch in your browser. An watch the magic...
Dim doc As PartDocument = ThisDoc.Document Dim orgSketch As PlanarSketch = ThisApplication.CommandManager. Pick(SelectionFilterEnum.kAllEntitiesFilter, "Select original sketch") Dim newSketch As PlanarSketch = ThisApplication.CommandManager. Pick(SelectionFilterEnum.kAllEntitiesFilter, "Select new sketch") For Each ent As SketchEntity In orgSketch.SketchEntities If ent.Construction Then Continue For If ent.Type = ObjectTypeEnum.kSketchPointObject Then Continue For newSketch.AddByProjectingEntity(ent) Next
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com
you can try this. Run this rule. Select the original sketch in your browser then select the target sketch in your browser. An watch the magic...
Dim doc As PartDocument = ThisDoc.Document Dim orgSketch As PlanarSketch = ThisApplication.CommandManager. Pick(SelectionFilterEnum.kAllEntitiesFilter, "Select original sketch") Dim newSketch As PlanarSketch = ThisApplication.CommandManager. Pick(SelectionFilterEnum.kAllEntitiesFilter, "Select new sketch") For Each ent As SketchEntity In orgSketch.SketchEntities If ent.Construction Then Continue For If ent.Type = ObjectTypeEnum.kSketchPointObject Then Continue For newSketch.AddByProjectingEntity(ent) Next
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com
I don't need to project every line that is not a construction line, but this seems to work and deleting projected lines that I don't need is a lot faster than projecting them one by one since this can be done with window selection.
Thank you very much!
I don't need to project every line that is not a construction line, but this seems to work and deleting projected lines that I don't need is a lot faster than projecting them one by one since this can be done with window selection.
Thank you very much!
Can't find what you're looking for? Ask the community or share your knowledge.