ok, that works for attributes, which is the gap I need covered. It would sure be nice if it worked for lines/arcs though. It glitched when I picked the circle. It is stumbling on the (entget Ent) after the first loop in the While statement. Its like you cannot get the entity list of the block record when the block is from an xref. I think you were trying to do what I did where you use the nentsel info to cover that but missed something. I need to look closer to refine your code. Either way, we still end up relying on the nentsel tree info for non-attributes. I'd like to figure a function to find the tree for any ename with just ename supplied. Looks like I am pst the hump for now though, thanks for posting your code. "T.Willey" <> |>Do you want something like this? |> |>Tim |> |>(defun c:GetTrail (/ Ent EntData EntType LastEnt LastEntData LastEntType LastEntPath EndList) |> |>(if (setq Ent (nentsel)) |> (progn |> (setq LastEnt (car (last Ent))) |> (setq Ent (car Ent)) |> (setq EntData (entget Ent)) |> (setq EntType (cdr (assoc 0 EntData))) |> (while (/= EntType "BLOCK_RECORD") |> (setq EndList (cons (list Ent EntType) EndList)) |> (setq Ent (cdr (assoc 330 EntData))) |> (setq EntData (entget Ent)) |> (setq EntType (cdr (assoc 0 EntData))) |> ) |> (if (= (type LastEnt) 'ENAME) |> (progn |> (setq LastEntData (entget LastEnt)) |> (setq LastEntType (cdr (assoc 0 LastEntData))) |> (if (setq LastEntPath (cdr (assoc 1 (tblsearch "block" (cdr (assoc 2 LastEntData)))))) |> (setq EndList (cons (list LastEnt LastEntType (strcat "XrPath - " LastEntPath)) EndList)) |> (setq EndList (cons (list LastEnt LastEntType) EndList)) |> ) |> ) |> ) |> ) |>) |>EndList |>) James Maeding jmaeding at hunsaker dot com Civil Engineer/Programmer