Acces Rebar Shape Family When Select Rebar from The Project Document

Hi all,
I tried to open Rebar Shape Family from the project document using Revit API C#
First, i got RebarShape:

Reference pickedRef = null;
Selection sel = uiapp.ActiveUIDocument.Selection;
pickedRef = sel.PickObject(ObjectType.Element, “Please select a Rebar”);
Rebar elem = doc.GetElement(pickedRef) as Rebar;
RebarShape rebarShape = doc.GetElement(elem.RebarShapeId) as RebarShape;

Then, I selected Rebar Shape by using Doc.GetElement(ID) and Cast Element to Family, but it seem casting not work, I have debugged and got null value of _fml parameter:

ElementId idElem = rebarShape.Id;
Element fml = doc.GetElement(idElem);
Family _fml =(Family)fml;
Document familyDoc = doc.EditFamily(_fml);

As parameter _fml was null so the command doc.EditFamily(_fml) caused error.
I have searched over the forum but could not find any relative topic.
Please help me!
Thank and best regard
Vo Minh Doan