I am trying to create a FamilyDocument, which should contain a combination of swept profiles, depending on Input.
I am using an existing FamilyDocument (*.rfa) as template.
I have successfully tested the code for sweeping in the FamilyDocument, however when I remove some unwanted, unrelated passive Families from that document, I can no longer create the sweep.
So my quetion is: what conditions are necessary for me to be able to create a sweep?
Regards, Dirk
Solved! Go to Solution.
Solved by dirk.neethling. Go to Solution.
Solved by FAIR59. Go to Solution.
Solved by Revitalizer. Go to Solution.
Solved by Revitalizer. Go to Solution.
Solved by Revitalizer. Go to Solution.
OK, so I selected the following template:
C:\ProgramData\Autodesk\RVT 2016\Family Templates\German\M_Profil (Sweep).rft
Now I get this:
exc = {"Sketch plane creation is not allowed in this family.\r\nParameter name: document"}
Really frustrating. Which template do I need to use in order to be able to construct a sweep?
Hi,
I think the template you mentioned is a 2D template, just for creating 2D profile families.
What about using "M_Allgemeines Modell.rft" for your 3D sweep ?
Revitalizer
Yes, I tried "M_Skelettbau" and managed to create the sweep.
When I instantiate that Family using ist Symbol, I get this:
+ exc {"The symbol is not active.\r\nParameter name: symbol"} System.Exception {Autodesk.Revit.Exceptions.ArgumentException}
Hi,
before using a FamilySymbol fs, you need to activate it:
if (!fs.IsActive)
{
fs.Activate();
}
Revitalizer
the Profil templates are basically a plane for a profile-loop
Use M_Allgemeines Modell.rft instead.
Hello Revitalizer,
I have this question:
I managed to create the FamilyDocument, to load it, and to instantiate it.
THen I try to apply the same transformations to it, as the ones for the segmental tunnel elements. THese include flipping upright, turning around the central axis and translating.
It seems that all Rotation transformations are not possible.
I get the following Errors. What Features do I Need to give the Family so that it can be transfomrmed after being instantiated?
Regards, DIrk
Hi Dirk,
I think this is caused by the restrictions of your family.
Depending on family category, there may be a boolean "Immer vertikal" respectively "Always vertical" property in the family editor.
This will prevent rotations around all but the Z axis.
You also could try to use a line-based family for your edges.
Revitalizer
OK, I found the check which stipulates that the element should always be vertical.
some additional questions:
- How can I programatically uncheck that?
- how can I convert this Family into an adaptive element?
- when I try and Close the FamilyDocument, after creation, the code cracks. How can I sequentially generate the FamilyDocument based on Inputs, then Close it, and then call it in a Project document?
Regards, Dirk
I tried using "M_Allgemeines Modell (Linie)" as a template. Now there is a new issue. I get a Dimension which I have to somehow edit, not understanding what the thing wants from me.
Very frustrating working with FamilyDocuments, which is why I intuitively tried to avaoid them.
Which template will allow me to generate a 3D model and transform it freely?
Hi,
- How can I programatically uncheck that?
That's a parameter of the Family.
- how can I convert this Family into an adaptive element?
Use a family template for adaptive components
- when I try and Close the FamilyDocument, after creation, the code cracks. How can I sequentially generate the FamilyDocument based on Inputs, then Close it, and then call it in a Project document?
I think it's a question of transactions.
LoadFamily needs to be performed outside a transaction.
Close the family document after loading it into the project file.
Have a nice weekend,
Revitalizer
Can die "AlwaysVertical" Parameter be modified after instantiation of the Family?
I printed out the Parameters of the FamilyELement. It does not contain a flag for "AlwaysVertical":
parm: Fläche-> Area
parm: Aussparung Höhe-> Length
parm: Kommentare-> Text
parm: Familie-> Invalid
parm: Typ-> Invalid
parm: Typ-ID-> Invalid
parm: Ebene-> Invalid
parm: Volumen-> Volume
parm: Entwurfsoption-> Invalid
parm: Familienname-> Text
parm: Aussparung Länge-> Length
parm: Phase abgebrochen-> Invalid
parm: Versatz-> Length
parm: Aussparung Breite-> Length
parm: Phase erstellt-> Invalid
parm: Kennzeichen-> Text
parm: Aussparung Tiefe-> Length
parm: Basisbauteil-> Text
parm: Bild-> Image
parm: Typname-> Text
parm: Kategorie-> Invalid
parm: Familie und Typ-> Invalid
parm: Volumen-> Volume
parm: Verschieben mit umliegenden Elementen-> YesNo
parm: Kategorie-> Invalid
parm: Host-ID-> Invalid
Hi,
the parameter is part of the family, not the element or the elementtype.
Revitalizer
You mean accessible through the Symbol obtained from
profileSymbol = Util.FindFamilySymbol(.. ?
Hi,
yes, the FamilyInstance.Symbol.Family.
Revitalizer
here is the Output from that. Still no Parameter for "AlwaysVertical"
parm: Typname-> Text
parm: Baugruppenkennzeichen-> Text
parm: Kategorie-> Invalid
parm: Entwurfsoption-> Invalid
parm: Typenkommentare-> Text
parm: Typenbild-> Image
parm: Baugruppenbeschreibung-> Text
parm: Kategorie-> Invalid
parm: Familienname-> Text
parm: URL-> URL
parm: Bauelement-> Text
parm: Beschreibung-> Text
parm: Typenmarkierung-> Text
parm: OmniClass-Titel-> Text
parm: Kosten-> Currency
parm: Codename-> Text
parm: Hersteller-> Text
parm: OmniClass-Nummer-> Text
parm: Modell-> Text
the crazy Thing is that I manually Switch off the flag AlwaysVertial in the FamilyEditor, save it, and then when I instantiate the Family, it's active again!
Hello Revitalizer,
could you pls help me with the creation of the Family? I've tried out al the Generic classes,
M_Allgemeines Modell...rft
None of them enable me to create an instance which I can flip upright.
Which template should I use to create an instance which I can then transform w.r.t. all degrees of freedom (rotate about the 3 axes, translate in the 3 axes)?
Regards, Dirk