The forum placed my answer to the other thread into this one. Forum slow, user quick, problem ensues.
The forum placed my answer to the other thread into this one. Forum slow, user quick, problem ensues.
Hi! How to create notes like these with lines and etc?
Yes. sure. I answered you in the thread you point to.
Best regards,
Jeremy
I ended up going this route.
View view = doc.ActiveView;
view.GetFilters();
IList<ElementId> categories = new List<ElementId>();
categories.Add(new ElementId(BuiltInCategory.OST_ConduitFitting));
List<Element> FAB_tagColl = new FilteredElementCollector(doc, doc.ActiveView.Id).OfCategory(BuiltInCategory.OST_ConduitFittingTags).Where(x => x is IndependentTag).ToList();
IList<FilterRule> rules = new List<FilterRule>();
Parameter systemparam = new FilteredElementCollector(doc).OfClass(typeof(FamilyInstance)).OfCategory(BuiltInCategory.OST_ConduitFitting).FirstElement().LookupParameter("System");
Transaction trans = new Transaction(doc);
using (Transaction t = new Transaction(doc, "Create and Apply Filter"))
{
//
}
string filterNames = "";
foreach (Element t in FAB_tagColl)
{
IndependentTag tag = t as IndependentTag;
MyTagName = tag.Name;
if (MyTagName == "Homerun Box Tag" ||
MyTagName == "JFA-Fabrication Duct - Bottom Of Duct Elevation Tag" ||
MyTagName == "JFA-Fabrication Duct - Flat or Set Tag" ||
MyTagName == "JFA-Fabrication Duct - Size Tag")
//this get filter names
foreach (ElementId id in view.GetFilters())
{
filterNames = doc.GetElement(id).Name;
//this gets every tag with "System" name
elem = doc.GetElement(tag.GetTaggedReference().ElementId);
Element MY_FAB_item = elem as Element;
String MyService = MY_FAB_item.LookupParameter("System").AsString();
if (MyService == "")
{
//if empty skip me
}
if (MyService == null)
{
//if null skip me
}
else
{
string red = "";
string green = "";
string blue = "";
if (MyService.Contains(filterNames))
{
trans.Start("Tag_Color");
//red value
red += view.GetFilterOverrides(id).ProjectionFillColor.Red;
int result1 = Int32.Parse(red);
Byte redbyte = Convert.ToByte(red);
//green value
green += view.GetFilterOverrides(id).ProjectionFillColor.Green;
int result2 = Int32.Parse(green);
Byte greenbyte = Convert.ToByte(green);
//Blue value
blue += view.GetFilterOverrides(id).ProjectionFillColor.Blue;
int result3 = Int32.Parse(blue);
Byte bluebyte = Convert.ToByte(blue);
Blue = bluebyte;
Red = redbyte;
Green = greenbyte;
MyColor = new Color(Red, Green, Blue);
ogs = new OverrideGraphicSettings();
ogs.SetProjectionLineColor(MyColor);
ogs.SetCutLineColor(MyColor);
doc.ActiveView.SetElementOverrides(t.Id, ogs);
trans.Commit();
//break;
}
I don't think you can go wrong if you follow the SOLID principles when asking yourself a best practice question. The first principle is the Single Responsibility Principle, which states, "Your solution explorer shall be overfilled with small classes that do one thing", paraphrasing, of course.
When selecting which board to post to, it clears ALL of my comments in the Details section, making it very user-unfriendly to use your website.
<Extension()>Public Function ValidPhase(element As Element, phase As Phase) As Boolean Dim status = ElementOnPhaseStatus.Existing If phase IsNot Nothing Then status = element.GetPhaseStatus(phase.Id) End If
I tried to reproduce the result "GetStatus() = None" but i couldn't . is it possible to send this revit file with only the lighting fixture. so I can look further?
Hi Moustafa,
The list AddDateCmd should populate the combox2a. My understanding is the DisplayMember is what populates the list and the ValueMember is the value that is passed thru when a DisplayMember item is selected. Right now IndexName and IndexValue are the same parameter.AsString().
well as i can see you are assigning the index and the index value the same values
new AddDateCmd { IndexName = parameter.AsString(), IndexValue = parameter.AsString()
try this
new AddDateCmd { IndexName = parameter.Definition.Name, IndexValue = parameter.AsString() }
Hi,
you can have a look into this
and
https://thebuildingcoder.typepad.com/blog/2014/10/new-text-note-and-text-width-calculation.html
hope that helps
Hi,
If you written a code that show us your trial to achieve your target, we would be happy to help you to a proper direction.
but basically you need
1. to create/Get a sheet view
2. create a view port and assign the view you need to place on the sheet
3. get the viewport width
4. place the view port on the sheet at a distance greater from the sum of all previously placed views.
hope that helps
may be this site would shade some light to what you are after:
can you attach the sat file to do some tests from my side?
Well, what is the value of "_variables.cadena" at compile time? does it equal to "ARM_KILOS" ?
Hi,
just a quick though came up... what if you get the closest xyz point to the globalpoint, and cross product both points to get the normal?
hi,
AFAIK you can't change that from the normal UI Interface, hence it would not be possible via API
Hope that helps
I think it is logically correct, because you can have curtain wall in Group A and its mullions in GroupB. but I would suggest to filter out mullions and Grids from the collection, and assign the group ID to the Curtainwall (Host).
I think same logic would apply to the nested family as well.
https://lightinganalysts.sharefile.com/d/s618e8da563a47ac8
The 4 lighting fixtures highlighted in the attached screen shot exhibit this problem. All the other lighting fixtures I've tried have the same issue. Thanks for looking!
It would be handy if the ReferenceWithContext object returned by the Reference Intersector had a Normal, in addition to the global point. Or if Meshes had a computeNormal method, like Faces do.