Quantcast
Channel: All Revit API Forum posts
Viewing all 67020 articles
Browse latest View live

Re: Change Tagging Family

$
0
0

Thanks  !

 

I actually changed the initial list where I was collecting the families to a List<FamilySymbol> so that the UI is able to read both family and family symbol:

List<FamilySymbol> categorytagFamily = new FilteredElementCollector(doc)
    .OfClass(typeof(FamilySymbol))
    .Cast<FamilySymbol>()
    .Where(f => f.Family.FamilyCategory.IsTagCategory &&
        f.Family.FamilyCategory.Name ==
        cName.Remove(cName.Length - 1) + " Tags")
    .ToList();

And it works great!

 

Thanks for the hint ;)


Re: External Command Initialization issue

$
0
0

VS is not inferring that function or method for me. I have to type the entire line. Could there be an issue with the API reference? The rest works fine. 

Re: GetRoomAtPoint() with design options

$
0
0

Thank you Frank, that's exactly what I was looking for.

How to get and modify element parameter without opening the revit file

$
0
0

Hi, now i want to read and modify  parameter in Forge Viewer but that data is read only so i want to through read revit file to get element parameter and modify  it, can anyone give me some advice or example?

Thanks.

Re: How to set parameters every second through mysql.

$
0
0

Hi, Friend

 

      Set parameter should use Transaction.

      In my previous tests, set paramter frequently may not change element's paramter successfully.

      Time_tick can use but maybe fail :)

 

Best Regards

Frank Liang

TJAD

Re: Filter elements in all selected views

$
0
0

Hi Friend,

     In my understanding of your issue, I think that make a WPF or Winform Window to list all views in Rvt, and check views that you want by checkbox. Then foreach all your <checked views' elementid> by your filter to get elements you want.

     Wish it is helpful for you :)

 

Best Regards,

Frank Liang

TJAD

BIM Interoperability Tool: Classification Manager

$
0
0

Hi!

 

I am using Classification Manager plug-in in assigning UniFormat/MasterFormat/OmniClass Codes to my model elements.

My problem is that Revit keeps on crashing/closing after few minutes of using.

I have already updated the plug-in for my Revit 2018.3 version but still the error occurs.

 

Thanks for the help!

Re: Explode SAT/DWG after import

$
0
0

Hi,

 

you could use SolidUtils.SplitVolumes(yourFusionedSolid) to split it into separate Solids.

 

A Solid obviously can be made of unconnected parts.

 

Revitalizer


Re: Modify PropertyLine

$
0
0

Okay, now I know I have to delete the PropertyLine and rollback to get the right id. But how can I accomplish that the new copied Propertyline belongs to the same sketch?

Re: Revit 2017 Ribbon Panel SplitButton Tooltip

$
0
0

Hi,

 

the answer is in the RevitAPI.chm, on RibbonItem.ToolTip property page.

 

"SplitButton and RadioButtonGroup cannotdisplay the tooltip set by this method, the SplitButton will always show the current PushButton tooltip, and RadioButtonGroup has no tooltip." 

 

Revitalizer

Re: Extracting user who created/ modified or edited family from family path

$
0
0

Oh it is not from the external command. I am getting the files info from outside first, though you are right to be dubious or skeptical about doing it.

I found that it fails more often then is successful. Also it seemed to only work in a windows network domain, one with an active directly.

Some fun for those who are keen.

 

get FamilySymbol from Family Class

$
0
0

I am new to revit API development. 

I want to get Family Symbol from Family. while I was checking in revit API Documentation I found below code

publicvoid GetInfoForSymbols(Family family)
{
    StringBuilder message = new StringBuilder("Selected element's family name is : " + family.Name);
    ISet<ElementId> familySymbolIds = family.GetFamilySymbolIds();  //ERRORif (familySymbolIds.Count == 0)
    {
        message.AppendLine("Contains no family symbols.");
    }else
    {
        message.AppendLine("The family symbols contained in this family are : ");// Get family symbols which is contained in this familyforeach (ElementId id in familySymbolIds)
        {
            FamilySymbol familySymbol = family.Document.GetElement(id) as FamilySymbol;// Get family symbol name
            message.AppendLine("\nName: " + familySymbol.Name);foreach (ElementId materialId in familySymbol.GetMaterialIds(false))
            {
                Material material = familySymbol.Document.GetElement(materialId) as Material;
                message.AppendLine("\nMaterial : " + material.Name);
            }
        }
    }

    TaskDialog.Show("Revit",message.ToString());
}

 I am getting an error in ISet<ElementId> familySymbolIds = family.GetFamilySymbolIds();

ISet is not defined. Can anybody help me in retrieving symbols from family.

Re: get FamilySymbol from Family Class

$
0
0

Hi,

 

add

 

using System.Collections.Generic;

 

Revitalizer

Re: get FamilySymbol from Family Class

$
0
0

I am using generic class "using System.Collections.Generic;" but Still its giving error

 

The Suggestion I am getting is:

 

class Autodesk.Revit.DB.ElementId

The ElementId object id used as a unique identification for an element within a single project.

The type or namespace name 'ISet<>' could not be found(are missing directive or an assembly reference?)

 

 

Re: get FamilySymbol from Family Class

$
0
0

Got the solution. I was using an older .net framework that's why the error was coming.

Thanks


Re: get FamilySymbol from Family Class

$
0
0

Hi,

 

yes, these problems - caused by false framework - are not obvious.

 

Congrats for solving it.

 

 

Revitalizer

Re: Revit 2018 bug report: exception in CustomExporter when exporting multiple v

$
0
0

I am also facing a similar issue with Revit 2018. Is there any solution available?

Thanks,

Chintan

WPF - Window With TreeView - Slow Load With Virtualization

$
0
0

A tool i'm building has a TreeView Control (Telerik RadTreeView) which will show all element instances in a Project/Active/Selection. The problem is that even with UI Virtualization the window load times are far too long. I'm not sure what to suspect now and am hoping one of the community has ran across this. 

 

Some examples of window load times below.

  • Project with around 150,000 model Element Instances it takes about 2 minutes to build.
  • Project with around 66,000 model Element Instances it takes about a minute to build
  • Project with less than 400 model Element Instances it takes about 5 seconds to build

 

Here is some additional pertinent information .

  1. I'm using WPF / XAML / MVVM / C# to build it.
  2. Ive timed the Filtered Element Collectors and found they are incredible fast and dont seem to be the issue.
  3. Ive submitted a support ticket to Telerik which only confirmed that the code should be working and does outside of Revit where I can create 180000 objects into 4 tiers in seconds.
  4. There are 4 tiers (See screenshot 1) of data arranged in the following manner
    • Tier 1: Category
      • Tier 2: Family Name
        • Tier 3: Type
          • Tier 4: Instance
  5. The TreeView is initially fully collapsed with only the first tier showing.
  6. Ive enabled UI Virtualization to show more as a user expands each node.
  7. Ive attached a zip file with the code in question

Screenshot #1

SS1.png

 

Screenshot #2

SS2.png

Re: Explode SAT/DWG after import

Re: Revit 2018 bug report: exception in CustomExporter when exporting multiple v

$
0
0

I fixed it as described above and that worked for me back then.

 

I have not tried it since.

 

Viewing all 67020 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>