Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am creating an Add-in that I want to create a construction plane.
I am not able to create the construction plane normal to the selected profile. Can someone please help me with this?
The code below does not work. The last print statement does not get executed.
_app = adsk.core.Application.get()
_ui = _app.userInterface
print('app ui')
# Get root component of active product
product = _app.activeProduct
design = adsk.fusion.Design.cast(product)
rootComp = design.rootComponent
print('root comp')
# Get construction planes
constructionPlanes = rootComp.constructionPlanes
print('constructionPlanes')
# Create construction plane input
constructionPlaneInput = constructionPlanes.createInput()
print('constructionPlaneInput')
# Get selected profile
sketchProfile = _selectedProfile.selection(0).entity
print('sketchProfile')
constructionPlaneInput.setByDistanceOnPath(sketchProfile, 0)
print('setByDistanceOnPath')
Solved! Go to Solution.