va3c / rvtva3c Goto Github PK
View Code? Open in Web Editor NEWRevit va3c exporter
Home Page: http://va3c.github.io/viewer/revit2.html
License: MIT License
Revit va3c exporter
Home Page: http://va3c.github.io/viewer/revit2.html
License: MIT License
Are there instructions on how to install this plugin and export models?
Jeremy,
Actually it's not an issue but a question. I'm working on a viewer with customized json format. However, I have some problem while tring to reuse geometry of family symbol with different transform.
As you mentioned in "the building coder", Revit API only provides a high level Transform class to expose matrix transformation relative information. But I need to assemble transformation MATRIX in a double array.
Here is my code to assemble transformation matrix:
Transform t = InstanceNode.GetTransform();
double[] matrix = new double[]
{
t.BasisX.X * t.Scale, t.BasisX.Y, t.BasisX.Z, glOrigin.X,
t.BasisY.X, t.BasisY.Y * t.Scale, t.BasisY.Z, glOrigin.Y,
t.BasisZ.X, t.BasisZ.Y, t.BasisZ.Z * t.Scale, glOrigin.Z
};
And the frustrated render looks as screenshot rst_basic_sample_project (with transformation issue).
I checked the transform property of a couple of elements and found that:
The most possible reason is that I assemle transformation matrix in a wrong way. Could you please help take a look and give me some tips? Thanks a lot!
David
Hi Jeremy,
I play for a few weeks with the exporter and I would Add an new function : Possibility to export rooms (volumes).
I think this could be a nice feature !
I started by creating data to "_objects" (userData...) but I have problems for adding geometry ( in "_geometries") !
I don't know how I can implement correctly this geometry function (actually, I don't have created 3D rooms in the 3D view) ?
Thank you for your help.
Cheers
Thomas
I downloaded latest release 2017.0.0.0 and built in VS 2017 using DLLs from Dynamo 1.3 and Revit 2017 which were:
RevitNodes.resources.dll; DynamoCore.dll; RevitRaaS.dll; DynamoServices.dll; DSCoreNodes.dll; DynamoRevitDS.dll; DynamoCore.resources.dll; DynamoUtilities.dll; ProtoCore.dll; RevitServices.dll; RevitNodes.dll; DynamoRaaS.dll; DSRevitNodesUI.customization.dll; DSRevitNodesUI.dll; RevitAPIUI.dll; RevitAPI.dll
I generated the DLL into Autodesk/Revit 2017/AddIns/rvt/, and also copied NewtonSoft.json.dll and RvtVa3c.addin
The add in doesn't show in either the add in tab or as an export option when testing with a basic wall or with the sample projects.
Jeremy,
I use RvtVa3c to export a Revit file and encounter crash while doing CustomExporter.Export(). The reason there're some elements with null category property. I think it would be a common situation as I encounter elements with null categroy property in some other Revit files.
My approash is to add the following process in both OnElementBegin() and OnElementEnd(). I'm not sure if it's the right way, but at least it works for me.
if (null == e.Category)
{
Debug.WriteLine("\r\n*** Non-category element!\r\n");
return;
}
David
Hey guys,
I followed the instructions on the front page.
I have been trying to add the add-in to Revit 2019 and while yesterday I manage to add it to Revit 2018 it is nog working now and Visual Studio gives me following errors:
I am not a programmer, so my knowlage to repair something is kind of limited.
Hope you can help me out.
Thank you kindly.
1>------ Build started: Project: DynVa3c, Configuration: Debug Any CPU ------ 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3274: The primary reference "RvtVa3c" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DSCoreNodes". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DynamoCore". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "ProtoCore". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "ProtoGeometry". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "ProtoInterface". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "RevitAPI". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "RevitAPIUI". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "RevitNodes". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "RevitServices". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(8,7,8,15): error CS0246: The type or namespace name 'Autodesk' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(9,7,9,15): error CS0246: The type or namespace name 'Autodesk' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(10,7,10,15): error CS0246: The type or namespace name 'Autodesk' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(11,7,11,13): error CS0246: The type or namespace name 'DSCore' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(12,7,12,13): error CS0246: The type or namespace name 'Dynamo' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(13,7,13,13): error CS0246: The type or namespace name 'Dynamo' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(14,7,14,13): error CS0246: The type or namespace name 'Dynamo' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(15,7,15,16): error CS0246: The type or namespace name 'ProtoCore' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(16,7,16,20): error CS0246: The type or namespace name 'RevitServices' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(17,7,17,20): error CS0246: The type or namespace name 'RevitServices' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(18,7,18,16): error CS0246: The type or namespace name 'ProtoCore' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(19,7,19,16): error CS0246: The type or namespace name 'ProtoCore' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(20,7,20,15): error CS0246: The type or namespace name 'Autodesk' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(21,7,21,12): error CS0246: The type or namespace name 'Revit' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs(22,7,22,14): error CS0246: The type or namespace name 'RvtVa3c' could not be found (are you missing a using directive or an assembly reference?) ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
Severity Code Description Project File Line Suppression State Suppression State
Error CS0246 The type or namespace name 'Autodesk' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 8 Active
Error CS0246 The type or namespace name 'Autodesk' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 9 Active
Error CS0246 The type or namespace name 'Autodesk' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 10 Active
Error CS0246 The type or namespace name 'DSCore' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 11 Active
Error CS0246 The type or namespace name 'Dynamo' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 12 Active
Error CS0246 The type or namespace name 'Dynamo' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 13 Active
Error CS0246 The type or namespace name 'Dynamo' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 14 Active
Error CS0246 The type or namespace name 'ProtoCore' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 15 Active
Error CS0246 The type or namespace name 'RevitServices' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 16 Active
Error CS0246 The type or namespace name 'RevitServices' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 17 Active
Error CS0246 The type or namespace name 'ProtoCore' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 18 Active
Error CS0246 The type or namespace name 'ProtoCore' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 19 Active
Error CS0246 The type or namespace name 'Autodesk' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 20 Active
Error CS0246 The type or namespace name 'Revit' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 21 Active
Error CS0246 The type or namespace name 'RvtVa3c' could not be found (are you missing a using directive or an assembly reference?) DynVa3c C:\Users\AS\Downloads\RvtVa3c-gh-pages (1)\RvtVa3c-gh-pages\DynVa3c\Va3c4Dynamo.cs 22 Active
Warning Could not resolve this reference. Could not locate the assembly "ProtoGeometry". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DynVa3c
Warning Could not resolve this reference. Could not locate the assembly "DSCoreNodes". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DynVa3c
Warning The referenced component 'DSCoreNodes' could not be found. DynVa3c
Warning The referenced component 'RvtVa3c' could not be found. DynVa3c
Warning The referenced component 'DynamoCore' could not be found. DynVa3c
Warning Could not resolve this reference. Could not locate the assembly "ProtoInterface". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DynVa3c
Warning The referenced component 'ProtoInterface' could not be found. DynVa3c
Warning The referenced component 'RevitServices' could not be found. DynVa3c
Warning Could not resolve this reference. Could not locate the assembly "RevitNodes". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DynVa3c
Warning The primary reference "RvtVa3c" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". DynVa3c
Warning The referenced component 'RevitAPIUI' could not be found. DynVa3c
Warning The referenced component 'ProtoCore' could not be found. DynVa3c
Warning Could not resolve this reference. Could not locate the assembly "ProtoCore". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DynVa3c
Warning The referenced component 'RevitNodes' could not be found. DynVa3c
Warning Could not resolve this reference. Could not locate the assembly "RevitAPI". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DynVa3c
Warning Could not resolve this reference. Could not locate the assembly "RevitAPIUI". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DynVa3c
Warning Could not resolve this reference. Could not locate the assembly "RevitServices". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DynVa3c
Warning Could not resolve this reference. Could not locate the assembly "DynamoCore". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DynVa3c
Warning The referenced component 'RevitAPI' could not be found. DynVa3c
Warning The referenced component 'ProtoGeometry' could not be found. DynVa3c
Hi Jeremy,
While reading the export logic in OnPolymesh(), I notice that you insert a 0 value index for every triangle.
int v1, v2, v3;
foreach (PolymeshFacet facet in polymesh.GetFacets())
{
//Debug.WriteLine( string.Format(" {0}: {1} {2} {3}", i++, facet.V1, facet.V2, facet.V3 ) );
v1 = CurrentVerticesPerMaterial.AddVertex(new PointInt(pts[facet.V1], _switch_coordinates));
v2 = CurrentVerticesPerMaterial.AddVertex(new PointInt(pts[facet.V2], _switch_coordinates));
v3 = CurrentVerticesPerMaterial.AddVertex(new PointInt(pts[facet.V3], _switch_coordinates));
**CurrentGeometryPerMaterial.data.faces.Add(0);**
CurrentGeometryPerMaterial.data.faces.Add(v1);
CurrentGeometryPerMaterial.data.faces.Add(v2);
CurrentGeometryPerMaterial.data.faces.Add(v3);
}
I'm quite confused by this line. IMHO, this 0 value index will make mesh messed up. However, va3c viewer renders model fine. Could you please give me a hint of it? Thanks a lot!
Cheers!
David Tan
Can this get revit version by js quickly?
when i build it, visual studio told me that err: “RvtVa3c.Va3cExportContext”did not
implete the member“Autodesk.Revit.DB.IExportContext.OnDaylightPortal(Autodesk.Revit.DB.DaylightPortalNode)”
i do not know what to do next.i use vs 2012 & revit 2015.
Hello,
Thank you for all the work on the Revit JSON exporter add-in.
For some reason the exporter fails when trying to filter the parameters of the objects to be exported. Please see below for a sequence of photos showing the general flow of the failure.
I am very inexperienced Visual Studio user. If more debugging information is required to show what's happening please make a specific request and I'll see if I can produce it.
Please note, this may be the same issue reported earlier for Revit 2019 as issue #17.
Best wishes,
Jake Staub
hi, dev guys, when i try to export my test model using this tool in Revit 2020, some issues show up, the exception msg as following:
执行外部命令时命令失败
Revit 无法完成外部命令,请与供应商联系以获取帮助,供应商提供给 Revit 的身份信息为: The Building Coder,[ http://thebuildingcoder.typepad.com]
Revit遇到Autodesk.Revit.Exceptions.ExternalApplicationException:未将对象引用设置到对象的实例。
在Autodesk.Revit.DB.CustomExporter.Export(View3D view)
在RvtVa3c.Command.ExportView3DIView3D view3d. String filename)在RvtVa3c.Command.Execute(ExternalCommandData commandData String& message, ElementSet elements)
在apiManagedExecuteCommand(AString*assemblyName,AString* cassName,AString* vendorDescription, MFCApp* pMFCApp, DBView pDBView, AString* message,
Set<Elementid.std:less<Elementid>\tnallc<Elementld>>*ids
Map<AString\AStringstd::less<AString>tnallc<std:pair<AString const AString> > >* data, AString* exceptionName, AString exceptionMessage)
Anyone had the same problem, so what are your tricks to fix it? plz tell me, thx a lot!
Jeremy,
I exported a small MEP model and found that RvtVa3c skips element colors configured via filter. I tried to find related Revit API which could query element's filter color but there's no luck.
Could you please give me some clues about how to get an element's filter color? Thanks a lot!
David
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.