Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Revit 2012 API Find and Replace

4 REPLIES 4
Reply
Message 1 of 5
adeuley
990 Views, 4 Replies

Revit 2012 API Find and Replace

I am trying to do a find and replace thru the API. Can anyone point me in the right direction. My biggest issue is keeping the formatting. Part of the text notes are underlined and others are not. I can do a find and replace but cannot seem to keep the formatting. Thanks for your help.

4 REPLIES 4
Message 2 of 5
Joe.Ye
in reply to: adeuley

Via API, the format of the TextNote string cannot be retrieved. So I don't think you can format the TextNote instance via API at the moment.

 



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
Message 3 of 5
yexiongjin
in reply to: Joe.Ye

That can be an API wish.

Message 4 of 5
adeuley
in reply to: yexiongjin

What makes me think it is possible is the fact that there is a find and replace within Revit that works the way I want it to. I have a feeling I am going to have to pass it into some kind of form with a richtext box first though.

Message 5 of 5
Joe.Ye
in reply to: adeuley

 

We can manually copy the text with format from the TextNote object after double click it, and paste it in Winword, then strin format can be duplicate.

 

However TextNote.Text just return a plain text, without the format information in the returned string. So we cannot replace the string with format. 

 

There is a change request for get/set the string fromat via API.

 

 



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network

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


Rail Community