.NET

Reply
*Expert Elite*
Keith.Brown
Posts: 1,101
Registered: ‎03-13-2008
Message 1 of 3 (162 Views)

Pipeobjects, tooltips, and xrefs.

162 Views, 2 Replies
02-01-2012 08:20 AM

I have created code for displaying information in Autocad MEP in the tooltips for a pipeobject.  To be clear, this is the tooltip that appears when you hover over a entity.  The tooltip appears to be working as intended when I am in the drawing with the actual entity.  In this case, it is an Autocad MEP pipe object.  When I hover over pipeobjects that are in xref drawings, the tooltip doesnt work anymore and it shows the out of the box tooltips.

 

I am checking to see if the entity under the aperature is a pipe with the following line of code:

 

                    If (ent.GetType.Name.ToString = Autodesk.Aec.Building.DatabaseServices.Type.Pipe.ToString) Then

 

So my first guess would be that the xref pipe isnt in the current database which is why the code isnt working.  So how would find the type of entity under the aperature that doesnt care if it is in the current dwg or is a xref?


Keith Brown AutoCAD MEP BLOG | RSS Feed
AutoCAD MEP 2014 | Revit 2014 | EastCoast CAD/CAM V6.1 | Visual Studio 2013
────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate. Thank you!
Valued Mentor
jeff
Posts: 325
Registered: ‎05-12-2009
Message 2 of 3 (159 Views)

Re: Pipeobjects, tooltips, and xrefs.

02-01-2012 08:43 AM in reply to: Keith.Brown

Maybe check if it is a BlockReference and if its BlockTableRecord IsFromExternalReference

then check nested entity

 

You can also find your answers @ TheSwamp
*Expert Elite*
Keith.Brown
Posts: 1,101
Registered: ‎03-13-2008
Message 3 of 3 (130 Views)

Re: Pipeobjects, tooltips, and xrefs.

02-02-2012 07:28 AM in reply to: jeff

Just making sure I understand you correctly.  So, in addition, to checking if there is a pipe under the cursor, i should check and see if it is a xref by checking to see if it is a block reference that has a block table record equal to isfromexternalreference and then check to see if it is a pipe as a nested enitity?

 

What if i just temporarily continually write to the command line what is under the cursor?  That should give me an idea of what to look for?  ok, i did this and stupid me, it just said block reference.  Pretty much as you said it would.  I will investigate further and see how much farther I get.

 


Keith Brown AutoCAD MEP BLOG | RSS Feed
AutoCAD MEP 2014 | Revit 2014 | EastCoast CAD/CAM V6.1 | Visual Studio 2013
────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate. Thank you!

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community