Message 1 of 1
Change an image for an coppied appearance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Everyone,
I am trying to add an image to an appearance that I copied from the Autodesk library. But I got an error as the picture below:
My code:
_newAppearanceAsset = _genericAppearanceAsset.CopyTo(_TTFAppearance)
_newAppearanceAsset.DisplayName = "New Material"
Dim _originalColor As Inventor.ColorAssetValue
_originalColor = _newAppearanceAsset.Item("generic_diffuse")
_originalColor.HasConnectedTexture = True
Dim _originTexture As Inventor.AssetTexture
_originTexture = _originalColor.ConnectedTexture
Dim _fileName As Inventor.FilenameAssetValue
_fileName = _originTexture.Item("unifiedbitmap_Bitmap")
_fileName.Value = "C:\TTFMaterials\Appearance_Images\FJL.jpg"
Many thanks
Ngoc Son
Autodesk User
Autodesk User