Appearance.addByCopy is still fuzzy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello.
Some time ago I've posted this about malfunction of Appearance.addByCopy. The issue was fixed in November 28, 2018 Product Update. However, I'm still facing some problems about copying appearances. The thing is, that when I try to make a copy of existing appearance in design, then source appearance disappears.
The py script is:
import adsk.core, adsk.fusion, adsk.cam, traceback
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
materialLibs = app.materialLibraries
matLib = materialLibs.item(1)
appear = matLib.appearances.item(0)
des = adsk.fusion.Design.cast(app.activeProduct)
appear1 = des.appearances.addByCopy(appear, "A")
#Having appearance named "A" in desing
#Let's make copy of appearance "A" and name it "A1"
appear2 = des.appearances.addByCopy(appear1, "A1")
#Having appearance named "A1" in desing. Appearance "A" disappeared!!!
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))