Autodesk Forge Automation - autodesk-forge

I am writing this because i need to improve productivity in the company that I work for.
I made several applications for internal use with Visual Studio VB.NET, but at this time i am thinking about this:
I have some DWG drawings with blocks and attributes that i use as templates.
On the other hand I have an Excel worksheet with columns that start with a number in the first row and the values below. Each row number corresponds to an attribute in a block inside of each DWG template.
I want to fill those attributes with the Excel sheet values . I already made it locally but it will be good to make it in a cloud.
Is it possible with Autodesk Forge?
How?
I really need you to help me.
Best regards
Luis

This is definitely possible with Design Automation, I see that you already have a working application in AutoCAD, does your application is tested in accoreconsole ? That comes with AutoCAD installation.

Related

Autocad selection filter in design automation

Hi I am prototyping an Autocad Design Automation project from an old desktop script. I used a selection filter before I realized that window selection etc don't work if it is off-screen. Design Automation by definition should be an 'off-screen' application, I think? Then I will have to loop through the whole database? Any other way to get around, please? I need to find a solution before too far off track...
Thank you very much!
You can test your script with accoreconsole.exe (it is in the autocad installation folder) on your local machine. There's still a window although invisible so selection should work as in AutoCAD.
you are correct with the understanding that Design Automation is off-screen. So the section of user interactive will not work on cloud engine. While windows selection of AutoCAD can input the windows points in code. e.g. in Design Automation scripts, define as below:
select w -150,150,0 150,-150,0 \n
It will select all entities that within the windows of the two corners. I used local Accoreconsole to demo (attached snapshot) . Accoreconsole is an off-screen environment on local. It is similar to Design Automation engine.
If your workflow does not know where the user may select, it will be not either possible to Design Automation to perform the action.

Is it possible to program a WebApp where u can import an .csv and export as pdf?

So i am currently working on a project for my company. The target is to make an automated pdf genarator for our products. I want to programm an WebApp for this and constantly implement new functions. We have a prepared Indesign file with a guidline that needs to be met. My question is, is this even possible, to feed the programm with the .csv file and at the end i will receive a finished .pdf(with the design guidline).
It is my first time on StackOverflow, so please excuse if i was not precise enough :)
PS: I know about the Data-Merge function in Indesign, yet this doesn't work for us.
Thanks :)
Yes, this is possible, however when you use it in an actual publicly accessible web app (as opposed to an in-house tool that you use manually), then you will need an InDesign server license for that.
But technically, it is definitively possible to write a script to read .csv files to generate a certain layout with certain contents.

Getting the list of all the views in a model on Forge

I am working on a Revit plugin to run on Forge (Design Automation app) that exports a 3D view through a custom exporter. As an input argument, it requires the name (or ElementID) of one of the 3D views from the Revit model. Is there a way to query the name of the views of a Revit model through other Forge solutions (like Data Management API)?
I couldn't find anything, if there is not an http api for that I assume I have to do it as part of my plugin run. What's the best to do that then?
Should I have a separate plugin that extracts the view names?
Thank you so much!
From your description, it appears that you have very little experience with Revit API add-ins. Maybe you should take a look at the getting started material first and work through the video tutorial. It explains a lot of important fundamentals, including covering this current question of yours.
The (almost) one and only way to retrieve elements from the Revit database is to use a filtered element collector. That would be the method of choice to find the element id of the 3D view you are looking for.
You cannot have searched very exhaustively, because many discussions by The Building Coder on the custom exporter and other topics include a code snippet showing how to pick a 3D view suitable for exporting.
To ensure you really have a 3D view set up just as you need it, you might prefer creating a new one from scratch.
Out of curiosity, is your task associated with the discussion thread on Revit API vs. ReCap API for historic project?

How to Create a MsWord TOC without automation?

I'm using Aspose.Words to construct a Word Document programmatically (C#) on a server. The dynamically generated documents can be imported by clients via a web interface. Everything is great except I'm unable to generate a TOC. I've already exhausted my options with Aspose. Updating TOC fields is simply not a feature that Aspose currently supports. So... I'm open to any other viable solution even if it involves other third-party components. Automation has been ruled out because the Word Document is constructed on the server-side and Microsoft does not recommend using Automation on servers.
Can anyone suggest a solution? The optimal solution would be simply to be able to programmatically do a TOC Field Update. The solution cannot require installation of Word on the server. Are there any server-side reporting components that support this feature?
If a simple TOC Field Update solution is not available, then the next best thing would probably be the ability to programmatically construct a TOC by inspecting the Word document and extracting page numbers.
All ideas and input are welcome. I need a solution very soon.
Thanks,
Ed
Check this
http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/aspose.words.documentbuilder.inserttableofcontents.html
BUt i can't find a way to generate it automatically without using F9 key in MS Word...

Version control for VBA file

I have a huge MS Access document with built-in VBA codebase. Is it possible to track the file (as I am developing it) with a (mercurial) version control system? Can I extract code and track that? Or is it just the-binary-file-path? Thanks.
It's possible with MS Access to export most of the code through scripts. I posted some here a while ago:
How do you use version control with Access development?
It's possible to version-control binary files, but it would be a little cleaner (IMO) to have the code separate. If it works for you though, then by all means do what you do.
There is a nice tool here https://github.com/hilkoc/vbaDeveloper .
It allows you to easily export and import all your vba code and can do this automatically as soon as you click 'save'.
The export files are all plain text which you can then put in version control in the usual way.
Access all the way up to 2010 has supported source code control, and that includes support for team foundation server. The fact that you place all files in ONE zip file, one folder on a hard drive, or one container called an accDB is a MOOT point. As long as EACH individual object can be viewed as a SEPARATE object, then why do you care if one is using a zip file, or an accDB file? This is a “logical” view vs a physical view issue.
The simple matter is EACH OBJECT IN ACCESS CAN BE EXPORTED AS A TEXT OBJECT. Thus Access has supported source control integrate using this ability with the standard Microsoft SCC interface since Access 97 (that is 17+ years!!).
When you use SCC such as Visual Source safe or Team Foundation server then the BUILT IN UI in Access supports display the objects status in question. You have resolution down to the form, report, sql query and code module level. So multiple developers can all work on the application at the same time. They only need check out the forms, reports quires etc. they are working on. Each developer thus has their own local build.
If using Visual Source Safe, then you see this in the ribbon:
If you using team foundation server, then you see this:
And for objects checked out, you see this:
And when you open, or even right click on an object, you see these additional options:
Of course given that “few” use this feature or even know what it is (and the posts on SO confirm this lack of knowledge), then it is LITTLE surprise that the feature was dropped in Access 2013 after all these years!. However some 3rd party add-ins claim to restore this ability. So the ability to export objects in 2013 as individual text files STILL remains in place.