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: 

new to REVIT API, can I get information from linked drawings

1 REPLY 1
Reply
Message 1 of 2
convolution
316 Views, 1 Reply

new to REVIT API, can I get information from linked drawings

I am completely new to the Revit API, but I have had experience with the AutoCAD .NET api. What I want to do is be able to click on some text in a linked drawing and be able to get the contents of the text in the drawing. Depending on the text, I then want to set some properties of some Revit model elements.

Is something like this possible with the Revit api? I am still very unfamilliar with the object model, so any advice is appreciated.

Thanks
1 REPLY 1
Message 2 of 2
joelkarr
in reply to: convolution

As far as I know you are not able to select an instance in a linked model.

To access the information from a linked model you can look at a post on building coder.

http://thebuildingcoder.typepad.com/blog/2009/02/list-linked-elements.html



you can try this to work with a linked document

Application app = commandData.Application;
DocumentSet docs = app.Documents;

foreach( Document doc in docs )
{
// You can check the name of doc.PathName to see if it is the linked doc you are looking for
// Then you can get any information you would like from the doc.
// I think maybe you would like to do a type filter and find all text and then process them for future actions?

// Unfortunately I don't think you can get coordinates of a mouse click but you could have the user select an object in the active document
// that is closest to the text, store the location of the selected object, and then search the linked document for the text object closest to th
// the location.
}

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