![]() |
|
|
|
#1
|
|||
|
|||
|
Quote:
2. This source code: Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
namespace DecryptMe
{
[Transaction(TransactionMode.Manual)]
[Regeneration(RegenerationOption.Manual)]
public class Class1 : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
//Get application and documnet objects
UIApplication uiapp = commandData.Application;
Document doc = uiapp.ActiveUIDocument.Document;
//Define a reference Object to accept the pick result
Reference pickedref = null;
//Pick a group
Selection sel = uiapp.ActiveUIDocument.Selection;
pickedref = sel.PickObject(ObjectType.Element, "Please select a group");
Element elem = doc.GetElement(pickedref);
Group group = elem as Group;
//Pick point
XYZ point = sel.PickPoint("Please pick a point to place group");
//Place the group
Transaction trans = new Transaction(doc);
trans.Start("Lab");
doc.Create.PlaceGroup(point, group.GroupType);
trans.Commit();
return Result.Succeeded;
}
}
}
Code:
using System;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
namespace ns0
{
[Regeneration(0)]
[Transaction(1)]
public class GClass0 : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
Transaction transaction;
for (;;)
{
int num = 睷.睷_0(-3);
for (;;)
{
switch (num)
{
case 0:
{
UIApplication uiapplication;
Selection selection = uiapplication.ActiveUIDocument.Selection;
Reference reference_ = 睸.睸_0(selection, 1, "Please select a group");
Document document;
Element element = 睹.睹_0(document, reference_);
Group object_ = element as Group;
num = 睷.睷_0(-2);
continue;
}
case 1:
goto IL_10D;
case 2:
{
Selection selection;
XYZ xyz_ = selection.PickPoint("Please pick a point to place group");
Document document;
transaction = new Transaction(document);
睺.睺_0(transaction, "Lab");
Group object_;
睽.睽_0(睻.睻_0(document), xyz_, 睼.睼_0(object_));
num = 睷.睷_0(-1);
continue;
}
case 3:
{
UIApplication uiapplication = 睾.睾_0(commandData);
Document document = 瞀.瞀_0(睿.睿_0(uiapplication));
num = 睷.睷_0(0);
continue;
}
}
break;
}
}
IL_10D:
transaction.Commit();
return 0;
}
// Note: this type is marked as 'beforefieldinit'.
static GClass0()
{
<AgileDotNetRT>.Initialize();
<AgileDotNetRT>.PostInitialize();
}
}
}
Thank you very much. |
| The Following User Says Thank You to congviet For This Useful Post: | ||
Indigo (07-19-2019) | ||
|
#2
|
|||
|
|||
|
Here are the two dlls
Here are the two dlls:
https://www67.zippyshare.com/v/3MW9QG87/file.html As for the Chinese characters those are some fields - delegates type! I rather not rename at all: the dll may not work after renaming! |
|
#3
|
|||
|
|||
|
I tried the file at
Quote:
Quote:
Quote:
|
| The Following User Says Thank You to congviet For This Useful Post: | ||
Indigo (07-19-2019) | ||
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unpack Agile.NET | Mendax47 | General Discussion | 2 | 06-28-2021 21:38 |
| Agile.Net 6.4 Unpack | Hexcode | General Discussion | 7 | 11-30-2020 17:59 |