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

Unable to load family from local drive

3 REPLIES 3
Reply
Message 1 of 4
kmkxperia
308 Views, 3 Replies

Unable to load family from local drive

I am trying to load the family from my location but I am getting the error of family cannot be loaded. It Loads the family for 1st time but when I delete the family and rerun I get below error can any help how to get rid of this. I need to Restart my Revit every time.

 

Wall wall = document.GetElement(uniqueIDstring) as Wall;
            
             String fileName = @"C:\ProgramData\Autodesk\RVT 2018\Libraries\US Metric\Openings\M_Opening.rfa";
  
        Family family = null;
        if (!document.LoadFamily(fileName, out family))
        {
                throw new Exception("Unable to load " + fileName);
        }

 

 

[Window Title]
Run Macro Failed

[Main Instruction]
Revit failed to execute OpeningProfile.

[Expanded Information]
A problem has been detected.

System.Exception: Unable to load C:\ProgramData\Autodesk\RVT 2018\Libraries\US Metric\Openings\M_Opening.rfa
at MacroModule.executeMacro_(MacroModule* , AString* macroName)
at MacroModule.executeMacro(MacroModule* , AString* )
at UIMacroGeneralManager.runMacro(UIMacroGeneralManager* , MacroModule* pModule, AString* macroName)

[^] Hide details [Close]

3 REPLIES 3
Message 2 of 4
ennujozlagam
in reply to: kmkxperia

@kmkxperia hello, can you share your revit family so we can check takes. thanks





Remember : without the difficult times in your LIFE, you wouldn't be who you are today. Be grateful for the good and the bad. ANGER doesn't solve anything. It builds nothing, but it can destroy everything...
Please mark this response as "Accept as Solution" if it answers your question. Kudos gladly accepted.
Message 3 of 4
kmkxperia
in reply to: ennujozlagam

Observed issue

1st run the Family is loaded and now delete it and change the family name to other family say M_Openings.rfa and build project and run macro.

Program runs without error but no Openings are not visible but when you mouse hove over they are highlighted. Now again delete these by selecting and run the macro. now error is observed that it is not able to load the family and it pass null.

Code is straight forward, is some thing in code missing in code or using the incorrect method or steps

Message 4 of 4
ennujozlagam
in reply to: kmkxperia

@kmkxperia hello, i have loaded your family no issues. I can't test/run because i don't your micro? Try to use door family instead of generic family and see if helps. i can't help much. thanks





Remember : without the difficult times in your LIFE, you wouldn't be who you are today. Be grateful for the good and the bad. ANGER doesn't solve anything. It builds nothing, but it can destroy everything...
Please mark this response as "Accept as Solution" if it answers your question. Kudos gladly accepted.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Technology Administrators