Place images in Model using Decal

Place images in Model using Decal

RakeshBSalwe
Contributor Contributor
659 Views
2 Replies
Message 1 of 3

Place images in Model using Decal

RakeshBSalwe
Contributor
Contributor

Hello,

 

I am trying to add image in model, tried below solution but that doesn't work when run in 3D View.

 

doc.Import(imagePath, imageImportOptions, view, out element);

 

After exploring more, found DecalType and Decal might solve my issue. But didnt find much information on API used for same.  Can you please guide me, how to implement the same through API?

 

Thanks in advance.

0 Likes
Accepted solutions (2)
660 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni
Accepted solution

Dear Rakesh,

 

Thank you very much for raising the question here in public after our short conversation on the topic in the Forge Zendesk help ticket 10884 [Place images in Model using Decal].

 

I searched the Internet for 'revit api decal':

 

https://duckduckgo.com/?q=revit+api+decal

 

To my surprise, I find nothing relevant except this thread. However, I would be very surprised if you were the first to try this.

 

One way to proceed is to follow the standard research procedure to find a Revit API solution:

 

https://thebuildingcoder.typepad.com/blog/2017/01/virtues-of-reproduction-research-mep-settings-onto...

 

  • Determine the optimal workflow and best practices to address your task at hand manually through the user interface first.
  • To do so, please discuss and analyse it with an experienced application engineer, product usage expert, or product support.
  • Once you have got that part sorted out, it is time to step up into the programming environment.
  • For instance use the element lister, RevitLookup and other methods to analyse the exact modifications generated in the Revit database by manually creating and setting up the decal in the manner required.
  • That analysis shows you what elements need to be added and their exact relationships and properties.
  • With that in hand, you can explore how to achieve the same programmatically.

 

This approach has worked thousands of times in the past for well over a decade, so why should it not work for you 🙂

 

Good luck and much success!

 

Please let us know how you end up solving this, in case anyone else has a similar need in future.

 

And I still hope some friendly soul out there already has gone through this process in the past and can share their experience.

 

Thank you!

 

Best regards,

 

Jeremy

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 3

czha626
Explorer
Explorer
Accepted solution

Dear Rakesh,

 

I am trying to do similar research on texturing images into 3D model surfaces. The Decal should do the work, but I didn't find anything relevant to achieve it via API or Dynamo.

 

Have you found a solution? It will be much appreciated if you could share your progress.

 

Thanks in advance.

 

Kind regards,

Cheng