Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Selection.point usage ?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
lionel.courgnaud
161 Views, 2 Replies

Selection.point usage ?

Hello,

 

I'm trying to create a sketchPoint from a Face selection. I'd like to have this point where I clicked on my Face.

The point is never on the created sketch.

I think I'm not using the right way to do this.

 

 

 

 

constructLib = adsk.core.ObjectCollection.create()
Selection = ui.selectEntity('Select FIRST FACE', 'Faces')
constructLib.add(Selection.entity)
newSketch0 : adsk.fusion.Sketch = rootComp.sketches.add(constructLib.item(0))  
ClickPoint : adsk.core.Point3D = Selection.point      
newSketch0.sketchPoints.add(ClickPoint)

 

 

 
Capture d’écran 2022-04-23 à 09.17.34.png
 
thanks for your help 🙂
 
2 REPLIES 2
Message 2 of 3

Hi @lionel.courgnaud .

 

Try this.

・・・
    point: adsk.core.Point3D = newSketch0.modelToSketchSpace(ClickPoint)
    newSketch0.sketchPoints.add(point)
Message 3 of 3

Perfect ! I didn't know this function 🙂 

It will save me a lot of time.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report