();
31 |
32 | public ProcessingResult(Statistics statistics)
33 | {
34 | Stats.Add(statistics);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/WebApplication/Definitions/ProfileDTO.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | namespace WebApplication.Definitions
20 | {
21 | public class ProfileDTO
22 | {
23 | public string Name { get; set; }
24 | public string AvatarUrl { get; set; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/WebApplication/Definitions/ProjectDTO.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using System;
20 | using Shared;
21 |
22 | namespace WebApplication.Definitions
23 | {
24 | public class ProjectDTO : ProjectDTOBase
25 | {
26 | public string Id { get; set; }
27 | public string Label { get; set; }
28 |
29 | ///
30 | /// Thumbnail URL.
31 | ///
32 | public string Image { get; set; }
33 |
34 | ///
35 | /// If project is assembly.
36 | ///
37 | public bool IsAssembly { get; set; }
38 |
39 | ///
40 | /// If project has drawings
41 | ///
42 | [Obsolete]
43 | public bool HasDrawing { get; set; }
44 |
45 | ///
46 | /// URL to DrawingsList JSON.
47 | ///
48 | public string DrawingsListUrl { get; set; }
49 |
50 | ///
51 | /// Adoption messages.
52 | ///
53 | public string[] AdoptWarnings { get; set; }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/WebApplication/Definitions/ProjectDTOBase.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | namespace WebApplication.Definitions
20 | {
21 | ///
22 | /// Common pieces for project-related DTOs
23 | ///
24 | public class ProjectDTOBase
25 | {
26 | ///
27 | /// URL to SVF directory.
28 | ///
29 | public string Svf { get; set; }
30 |
31 | ///
32 | /// URL to BOM JSON.
33 | ///
34 | public string BomJsonUrl { get; set; }
35 |
36 | ///
37 | /// URL to download BOM CSV.
38 | ///
39 | public string BomDownloadUrl { get; set; }
40 |
41 | ///
42 | /// URL to download current model
43 | ///
44 | public string ModelDownloadUrl { get; set; }
45 |
46 | ///
47 | /// Parameters hash
48 | ///
49 | public string Hash { get; set; }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/WebApplication/Definitions/ProjectInfo.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | namespace WebApplication.Definitions
20 | {
21 | public class ProjectInfo
22 | {
23 | public string Name { get; set; }
24 | public string TopLevelAssembly { get; set; }
25 |
26 | public ProjectInfo(string NameParam = null, string TopLevelAssemblyParam = null)
27 | {
28 | Name = NameParam;
29 | TopLevelAssembly = TopLevelAssemblyParam;
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/WebApplication/Definitions/ProjectMetadata.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using System.Text.Json.Serialization;
20 |
21 | namespace WebApplication.Definitions
22 | {
23 | public class ProjectMetadata
24 | {
25 | ///
26 | /// Hash string for parameters.
27 | ///
28 | [JsonPropertyName("hash")]
29 | public string Hash { get; set; }
30 |
31 | ///
32 | /// Pathname of the top-level assembly.
33 | ///
34 | [JsonPropertyName("tla")]
35 | public string TLA { get; set; }
36 |
37 | public bool IsAssembly => !string.IsNullOrEmpty(TLA);
38 |
39 | [JsonPropertyName("hasDrawings")]
40 | public bool HasDrawings { get; set; }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/WebApplication/Definitions/ProjectStateDTO.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using System.Text.Json.Serialization;
20 | using Shared;
21 |
22 | namespace WebApplication.Definitions
23 | {
24 | public class ProjectStateDTO : ProjectDTOBase
25 | {
26 | ///
27 | /// Parameters.
28 | ///
29 | [JsonPropertyName("parameters")]
30 | public InventorParameters Parameters { get; set; }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/WebApplication/Definitions/PublisherConfiguration.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | namespace WebApplication.Definitions
20 | {
21 | public enum CompletionCheck
22 | {
23 | ///
24 | /// Use polling (ask about status periodically).
25 | ///
26 | Polling,
27 |
28 | ///
29 | /// Use callback URL to get notification from FDA servers.
30 | ///
31 | Callback
32 | }
33 |
34 | public class PublisherConfiguration
35 | {
36 | ///
37 | /// How publisher should check for completion.
38 | ///
39 | public CompletionCheck CompletionCheck { get; set; } = CompletionCheck.Polling;
40 |
41 | private string callbackUrlBase;
42 |
43 | ///
44 | /// Base URL for callback.
45 | ///
46 | public string CallbackUrlBase
47 | {
48 | get
49 | {
50 | return callbackUrlBase + "/";
51 | }
52 | set
53 | {
54 | callbackUrlBase = value;
55 | }
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/WebApplication/Job/IResultSender.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using System.Threading.Tasks;
20 |
21 | namespace WebApplication.Job
22 | {
23 | ///
24 | /// Interface to send results back.
25 | ///
26 | public interface IResultSender
27 | {
28 | Task SendSuccessAsync();
29 | Task SendSuccessAsync(object arg0);
30 | Task SendSuccessAsync(object arg0, object arg1);
31 | Task SendSuccessAsync(object arg0, object arg1, object arg2);
32 |
33 | ///
34 | /// Send information about failed processing.
35 | ///
36 | /// ID of the job. // TODO: is it useful?
37 | /// Error details
38 | Task SendErrorAsync(ProcessingError error);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/WebApplication/Job/JobItemBase.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using Microsoft.Extensions.Logging;
20 | using System;
21 | using System.Threading.Tasks;
22 | using WebApplication.Processing;
23 |
24 | namespace WebApplication.Job
25 | {
26 | public abstract class JobItemBase
27 | {
28 | protected ILogger Logger { get; }
29 | protected ProjectWork ProjectWork { get; }
30 | public string ProjectId { get; }
31 | public string Id { get; }
32 |
33 | protected JobItemBase(ILogger logger, string projectId, ProjectWork projectWork)
34 | {
35 | ProjectId = projectId;
36 | Id = Guid.NewGuid().ToString();
37 | ProjectWork = projectWork;
38 | Logger = logger;
39 | }
40 |
41 | public abstract Task ProcessJobAsync(IResultSender resultSender);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/WebApplication/Job/UpdateModelJobItem.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using Microsoft.Extensions.Logging;
20 | using System.Threading.Tasks;
21 | using Shared;
22 | using WebApplication.Definitions;
23 | using WebApplication.Processing;
24 |
25 | namespace WebApplication.Job
26 | {
27 | public class UpdateModelJobItem : JobItemBase
28 | {
29 | public InventorParameters Parameters { get; }
30 |
31 | public UpdateModelJobItem(ILogger logger, string projectId, InventorParameters parameters, ProjectWork projectWork)
32 | : base(logger, projectId, projectWork)
33 | {
34 | Parameters = parameters;
35 | }
36 |
37 | public override async Task ProcessJobAsync(IResultSender resultSender)
38 | {
39 | using var scope = Logger.BeginScope("Update Model ({Id})");
40 |
41 | Logger.LogInformation($"ProcessJob (Update) {Id} for project {ProjectId} started.");
42 |
43 | (ProjectStateDTO state, FdaStatsDTO stats, string reportUrl) = await ProjectWork.DoSmartUpdateAsync(Parameters, ProjectId);
44 |
45 | Logger.LogInformation($"ProcessJob (Update) {Id} for project {ProjectId} completed.");
46 |
47 | // send that we are done to client
48 | await resultSender.SendSuccessAsync(state, stats, reportUrl);
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/WebApplication/Pages/Error.cshtml:
--------------------------------------------------------------------------------
1 | @page
2 | @model ErrorModel
3 | @{
4 | ViewData["Title"] = "Error";
5 | }
6 |
7 | Error.
8 | An error occurred while processing your request.
9 |
10 | @if (Model.ShowRequestId)
11 | {
12 |
13 | Request ID: @Model.RequestId
14 |
15 | }
16 |
17 | Development Mode
18 |
19 | Swapping to the Development environment displays detailed information about the error that occurred.
20 |
21 |
22 | The Development environment shouldn't be enabled for deployed applications.
23 | It can result in displaying sensitive information from exceptions to end users.
24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
25 | and restarting the app.
26 |
27 |
--------------------------------------------------------------------------------
/WebApplication/Pages/Error.cshtml.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics;
2 | using Microsoft.AspNetCore.Mvc;
3 | using Microsoft.AspNetCore.Mvc.RazorPages;
4 | using Microsoft.Extensions.Logging;
5 |
6 | namespace WebApplication.Pages
7 | {
8 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
9 | public class ErrorModel : PageModel
10 | {
11 | private readonly ILogger _logger;
12 |
13 | public ErrorModel(ILogger logger)
14 | {
15 | _logger = logger;
16 | }
17 |
18 | public string RequestId { get; set; }
19 |
20 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
21 |
22 | public void OnGet()
23 | {
24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/WebApplication/Pages/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @namespace WebApplication.Pages
2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
3 |
--------------------------------------------------------------------------------
/WebApplication/Processing/CreateBOM.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using System.Collections.Generic;
20 | using WebApplication.Definitions;
21 |
22 | namespace WebApplication.Processing
23 | {
24 | public class CreateBOM : ForgeAppBase
25 | {
26 | public override string Id => nameof(CreateBOM);
27 | public override string Description => "Generate BOM for Inventor document";
28 |
29 | protected override string OutputUrl(ProcessingArgs projectData) => projectData.BomUrl;
30 | protected override string OutputName => "bom.json";
31 |
32 | public CreateBOM(Publisher publisher) : base(publisher) {}
33 |
34 | public override List ActivityCommandLine =>
35 | new List
36 | {
37 | $"$(engine.path)\\InventorCoreConsole.exe /al \"$(appbundles[{ActivityId}].path)\" /i \"$(args[{InputDocParameterName}].path)\""
38 | };
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/WebApplication/Processing/CreateRFA.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using Autodesk.Forge.DesignAutomation.Model;
20 | using System.Collections.Generic;
21 | using WebApplication.Definitions;
22 |
23 | namespace WebApplication.Processing
24 | {
25 | ///
26 | /// RFA generator from Inventor document.
27 | ///
28 | public class CreateRFA : ForgeAppBase
29 | {
30 | public override string Id => nameof(CreateRFA);
31 | public override string Description => "Generate RFA from Inventor document";
32 |
33 | protected override string OutputUrl(ProcessingArgs projectData) => projectData.RfaUrl;
34 | protected override string OutputName => "Output.rfa";
35 |
36 | protected internal override ForgeRegistration Registration { get; } = ForgeRegistration.All;
37 |
38 | ///
39 | /// Constructor.
40 | ///
41 | public CreateRFA(Publisher publisher) : base(publisher) {}
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/WebApplication/Processing/CreateSAT.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using WebApplication.Definitions;
20 |
21 | namespace WebApplication.Processing
22 | {
23 | ///
24 | /// SAT generator from Inventor document.
25 | ///
26 | public class CreateSAT : ForgeAppBase
27 | {
28 | public override string Id => nameof(CreateSAT);
29 | public override string Description => "Generate SAT from Inventor document";
30 |
31 | protected override string OutputUrl(ProcessingArgs projectData) => projectData.SatUrl;
32 | protected override string OutputName => "export.sat";
33 |
34 | protected internal override ForgeRegistration Registration { get; } = ForgeRegistration.All;
35 |
36 | ///
37 | /// Constructor.
38 | ///
39 | public CreateSAT(Publisher publisher) : base(publisher) {}
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/WebApplication/Processing/CreateSVF.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using WebApplication.Definitions;
20 |
21 | namespace WebApplication.Processing
22 | {
23 | ///
24 | /// SVF generator from Inventor document.
25 | ///
26 | public class CreateSVF : ForgeAppBase
27 | {
28 | public override string Id => nameof(CreateSVF);
29 | public override string Description => "Generate SVF from Inventor document";
30 |
31 | protected override string OutputUrl(ProcessingArgs projectData) => projectData.SvfUrl;
32 | protected override string OutputName => "SvfOutput";
33 | protected override bool IsOutputZip => true;
34 |
35 | ///
36 | /// Constructor.
37 | ///
38 | public CreateSVF(Publisher publisher) : base(publisher) {}
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/WebApplication/Processing/CreateThumbnail.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using WebApplication.Definitions;
20 |
21 | namespace WebApplication.Processing
22 | {
23 | ///
24 | /// Generate PNG thumbnail for Inventor document.
25 | ///
26 | public class CreateThumbnail : ForgeAppBase
27 | {
28 | public override string Id => nameof(CreateThumbnail);
29 | public override string Description => "Generate thumbnail from Inventor document";
30 |
31 | protected override string OutputUrl(ProcessingArgs projectData)
32 | {
33 | return (projectData as AdoptionData).ThumbnailUrl; // TODO: use generics
34 | }
35 |
36 | protected override string OutputName => "thumbnail.png";
37 |
38 | ///
39 | /// Constructor.
40 | ///
41 | public CreateThumbnail(Publisher publisher) : base(publisher) { }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/WebApplication/Processing/ExtractParameters.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using WebApplication.Definitions;
20 |
21 | namespace WebApplication.Processing
22 | {
23 | ///
24 | /// Extract parameters from Inventor document and save the current model state.
25 | ///
26 | public class ExtractParameters : ForgeAppBase
27 | {
28 | public override string Id => nameof(ExtractParameters);
29 | public override string Description => "Extract Parameters and Save Inventor document";
30 |
31 | protected override string OutputName => "documentParams.json";
32 | protected override string OutputUrl(ProcessingArgs projectData) => projectData.ParametersJsonUrl;
33 |
34 | ///
35 | /// Constructor.
36 | ///
37 | public ExtractParameters(Publisher publisher) : base(publisher) { }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/WebApplication/Processing/UpdateProject.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | namespace WebApplication.Processing
20 | {
21 | ///
22 | /// Update project:
23 | /// - generate SVF
24 | /// - extract parameters and BOM
25 | /// - save current model
26 | ///
27 | public class UpdateProject : AggregatedDefinition
28 | {
29 | public UpdateProject(Publisher publisher) :
30 | base(publisher,
31 | new UpdateParameters(publisher),
32 | new CreateSVF(publisher),
33 | new CreateBOM(publisher))
34 | {
35 | }
36 |
37 | public override string Id => nameof(UpdateProject);
38 | public override string Description => "Update parameters";
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/WebApplication/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:33408",
7 | "sslPort": 44351
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "aps-configurator-inventor": {
19 | "commandName": "Project",
20 | "commandLineArgs": "poc=true",
21 | "launchBrowser": true,
22 | "environmentVariables": {
23 | "ASPNETCORE_ENVIRONMENT": "Development"
24 | },
25 | "applicationUrl": "https://localhost:5001"
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/WebApplication/Services/AdoptProjectWithParametersPayloadProvider.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Net.Http;
3 | using System.Text.Json;
4 | using System.Threading.Tasks;
5 | using Microsoft.Extensions.Logging;
6 | using WebApplication.Definitions;
7 |
8 | namespace WebApplication.Services
9 | {
10 | public class AdoptProjectWithParametersPayloadProvider
11 | {
12 | private readonly ILogger _logger;
13 | private readonly IHttpClientFactory _clientFactory;
14 |
15 | public AdoptProjectWithParametersPayloadProvider(ILogger logger, IHttpClientFactory clientFactory)
16 | {
17 | _logger = logger;
18 | _clientFactory = clientFactory;
19 | }
20 |
21 | public async Task GetParametersAsync(string jsonFileUrl)
22 | {
23 | _logger.LogInformation($"downloading parameters from {jsonFileUrl}");
24 |
25 | var httpClient = _clientFactory.CreateClient();
26 | await using var httpStream = await httpClient.GetStreamAsync(jsonFileUrl);
27 |
28 | StreamReader reader = new StreamReader(httpStream);
29 | var jsonAsString = await reader.ReadToEndAsync();
30 |
31 | _logger.LogDebug($"parsing parameters from {jsonAsString}");
32 |
33 | return JsonSerializer.Deserialize(jsonAsString);
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/WebApplication/Services/BucketPrefixProvider.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.Forge.Core;
2 | using Microsoft.Extensions.Configuration;
3 | using Microsoft.Extensions.Options;
4 |
5 | namespace WebApplication.Services
6 | {
7 | public class BucketPrefixProvider
8 | {
9 | private readonly ForgeConfiguration _forgeConfig;
10 | private readonly IConfiguration _configuration;
11 |
12 | public BucketPrefixProvider(IOptions forgeConfiguration, IConfiguration configuration)
13 | {
14 | _configuration = configuration;
15 | _forgeConfig = forgeConfiguration.Value;
16 | }
17 |
18 | public string GetBucketPrefix(string suffixParam = null)
19 | {
20 | string suffix = suffixParam ?? _configuration?.GetValue("BucketKeySuffix");
21 | return $"authd{suffix}-{_forgeConfig.ClientId}".ToLowerInvariant();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/WebApplication/Services/Exceptions/ProjectAlreadyExistsException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace WebApplication.Services.Exceptions
4 | {
5 | public class ProjectAlreadyExistsException : Exception
6 | {
7 | private readonly string _projectName;
8 |
9 | public ProjectAlreadyExistsException(string projectName) : base($"Project with name {projectName} already exists")
10 | {
11 | _projectName = projectName;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/WebApplication/Services/IBucketKeyProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace WebApplication.Services
4 | {
5 | public interface IBucketKeyProvider
6 | {
7 | string AnonymousBucketKey {get;}
8 | Task GetBucketKeyAsync();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/WebApplication/Services/LoggedInUserBucketKeyProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Autodesk.Forge.Core;
4 | using Microsoft.Extensions.Configuration;
5 | using Microsoft.Extensions.Options;
6 | using WebApplication.State;
7 | using WebApplication.Utilities;
8 |
9 | namespace WebApplication.Services
10 | {
11 | public class LoggedInUserBucketKeyProvider : IBucketKeyProvider
12 | {
13 | private readonly ProfileProvider _profileProvider;
14 | private readonly IResourceProvider _resourceProvider;
15 | public string AnonymousBucketKey {get;}
16 |
17 | public LoggedInUserBucketKeyProvider(ProfileProvider profileProvider, IResourceProvider resourceProvider)
18 | {
19 | _profileProvider = profileProvider;
20 | _resourceProvider = resourceProvider;
21 |
22 | AnonymousBucketKey = resourceProvider.BucketKey;
23 | }
24 |
25 | public async Task GetBucketKeyAsync()
26 | {
27 | if (!_profileProvider.IsAuthenticated) return AnonymousBucketKey;
28 |
29 | dynamic profile = await _profileProvider.GetProfileAsync();
30 | var userId = profile.userId;
31 |
32 | return _resourceProvider.LoggedUserBucketKey(userId);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/WebApplication/Services/MigrationBucketKeyProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using WebApplication.Utilities;
4 |
5 | namespace WebApplication.Services
6 | {
7 | public class MigrationBucketKeyProvider : IBucketKeyProvider
8 | {
9 | private readonly BucketPrefixProvider _bucketPrefixProvider;
10 | private readonly IResourceProvider _resourceProvider;
11 | private string BucketKey = "";
12 | public string AnonymousBucketKey {get;}
13 |
14 | public MigrationBucketKeyProvider(BucketPrefixProvider bucketPrefixProvider, IResourceProvider resourceProvider)
15 | {
16 | _bucketPrefixProvider = bucketPrefixProvider;
17 | _resourceProvider = resourceProvider;
18 | AnonymousBucketKey = resourceProvider.BucketKey;
19 | }
20 |
21 | public Task GetBucketKeyAsync()
22 | {
23 | return Task.FromResult(BucketKey);
24 | }
25 | public string SetBucketKeyFromOld(string bucketKeyOld)
26 | {
27 | BucketKey = GetBucketKeyFromOld(bucketKeyOld);
28 |
29 | return BucketKey;
30 | }
31 |
32 | public string GetBucketKeyFromOld(string bucketKeyOld)
33 | {
34 | string bucketKeyNew;
35 | string [] splittedBucketKeyOld = bucketKeyOld.Split('-');
36 |
37 | if (splittedBucketKeyOld[0] == ResourceProvider.projectsTag)
38 | {
39 | // anonymous bucket key
40 | bucketKeyNew = AnonymousBucketKey;
41 | }
42 | else
43 | {
44 | // logged user bucket key
45 | string userId = splittedBucketKeyOld[2];
46 | string userHash = splittedBucketKeyOld[3];
47 | bucketKeyNew = _resourceProvider.LoggedUserBucketKey(userId, userHash);
48 | }
49 |
50 | return bucketKeyNew;
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/WebApplication/Services/ProfileProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 |
4 | namespace WebApplication.Services
5 | {
6 | public class ProfileProvider
7 | {
8 | private readonly TokenService _tokenService;
9 | private readonly Lazy> _lazyProfile;
10 | public Task Token => _tokenService.GetToken(Code, VerifierId);
11 | public string Code { private get; set; }
12 | public string VerifierId { private get; set; }
13 |
14 | public ProfileProvider(IForgeOSS forgeOss, TokenService tokenService)
15 | {
16 | _lazyProfile = new Lazy>(async () => await forgeOss.GetProfileAsync(await Token));
17 | _tokenService = tokenService;
18 | }
19 |
20 | public bool IsAuthenticated => !string.IsNullOrEmpty(Code);
21 |
22 | public Task GetProfileAsync() => _lazyProfile.Value;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/WebApplication/State/NewProjectModel.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using Microsoft.AspNetCore.Http;
20 |
21 | namespace WebApplication.State
22 | {
23 | public class NewProjectModel
24 | {
25 | public string root {get; set;}
26 | public IFormFile package { get; set; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/WebApplication/State/Uploads.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using System.Collections.Generic;
20 | using WebApplication.Definitions;
21 |
22 | namespace WebApplication.State
23 | {
24 | public class Uploads
25 | {
26 | private readonly Dictionary _uploadFilenames;
27 | private readonly Dictionary _uploadProjects;
28 |
29 | public Uploads()
30 | {
31 | _uploadFilenames = new Dictionary();
32 | _uploadProjects = new Dictionary();
33 | }
34 |
35 | public void AddUploadData(string uploadId, ProjectInfo projectInfo, string filename)
36 | {
37 | _uploadFilenames.Add(uploadId, filename);
38 | _uploadProjects.Add(uploadId, projectInfo);
39 | }
40 |
41 | public (ProjectInfo projectInfo, string filename) GetUploadData(string uploadId)
42 | {
43 | return (projectInfo: _uploadProjects[uploadId], filename: _uploadFilenames[uploadId]);
44 | }
45 |
46 | public void ClearUploadData(string uploadId)
47 | {
48 | _uploadFilenames.Remove(uploadId);
49 | _uploadProjects.Remove(uploadId);
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/WebApplication/Utilities/Collections.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using System.Collections.Generic;
20 |
21 | namespace WebApplication.Utilities
22 | {
23 | public class Collections
24 | {
25 | ///
26 | /// Merge dictionaries into a single one.
27 | ///
28 | /// NOTE: in case of several key-value pairs - the last value will "survive".
29 | ///
30 | public static Dictionary MergeDictionaries(IEnumerable> dictionaries)
31 | {
32 | var output = new Dictionary();
33 |
34 | foreach (var dict in dictionaries)
35 | {
36 | foreach (var (key, value) in dict)
37 | {
38 | // to avoid exception on collision
39 | output[key] = value;
40 | }
41 | }
42 |
43 | return output;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/WebApplication/Utilities/ExtractedBomEx.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Text;
4 | using Shared;
5 |
6 | namespace WebApplication.Utilities
7 | {
8 | public static class ExtractedBomEx
9 | {
10 | ///
11 | /// Convert BOM to CSV representation.
12 | ///
13 | /// CSV string.
14 | public static string ToCSV(this ExtractedBOM bom)
15 | {
16 | if (! bom.HasColumns()) throw new ApplicationException("Invalid BOM: header is expected.");
17 |
18 | var columnsLength = bom.Columns.Length;
19 |
20 | var builder = new StringBuilder(32 * 1024);
21 | builder.AppendJoin(",", bom.Columns.Select(column => Encode(column.Label)));
22 | builder.AppendLine();
23 |
24 | for (var i = 0; i < bom.Data?.Length; i++)
25 | {
26 | object[] row = bom.Data[i];
27 | if (row.Length != columnsLength)
28 | throw new ApplicationException(
29 | $"Invalid BOM: row {i} has different number of columns than header.");
30 |
31 | builder.AppendJoin(",", row.Select(value => Encode(value.ToString())));
32 | builder.AppendLine();
33 | }
34 |
35 | return builder.ToString();
36 | }
37 |
38 | public static bool HasColumns(this ExtractedBOM bom)
39 | {
40 | return bom.Columns?.Length > 0;
41 | }
42 |
43 | public static bool HasData(this ExtractedBOM bom)
44 | {
45 | return bom.Data?.Length > 0 && bom.Data?[0].Length > 0;
46 | }
47 |
48 | private static string Encode(string value)
49 | {
50 | // - Fields with embedded commas or double-quote characters must be quoted
51 | if (value.Contains(","))
52 | {
53 | return "\"" +
54 | // - Each of the embedded double-quote characters must be represented by a pair of double-quote characters
55 | value.Replace("\"", "\"\"") +
56 | "\"";
57 | }
58 | else
59 | {
60 | return value;
61 | }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/WebApplication/Utilities/FileSystem.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using System.IO;
20 |
21 | namespace WebApplication.Utilities
22 | {
23 | ///
24 | /// Utilities for files/directories work.
25 | ///
26 | public static class FileSystem
27 | {
28 | ///
29 | /// Copy directory.
30 | ///
31 | public static void CopyDir(string dirFrom, string dirTo)
32 | {
33 | // based on https://stackoverflow.com/a/8022011
34 | var dirFromLength = dirFrom.Length + 1;
35 |
36 | foreach (string dir in Directory.GetDirectories(dirFrom, "*", SearchOption.AllDirectories))
37 | {
38 | Directory.CreateDirectory(Path.Combine(dirTo, dir.Substring(dirFromLength)));
39 | }
40 |
41 | foreach (string fileName in Directory.GetFiles(dirFrom, "*", SearchOption.AllDirectories))
42 | {
43 | File.Copy(fileName, Path.Combine(dirTo, fileName.Substring(dirFromLength)));
44 | }
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/WebApplication/Utilities/GuidGenerator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace WebApplication.Utilities
4 | {
5 | public interface IGuidGenerator
6 | {
7 | string GenerateGuid();
8 | }
9 |
10 | public class GuidGenerator : IGuidGenerator
11 | {
12 | public string GenerateGuid()
13 | {
14 | return Guid.NewGuid().ToString("N");
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/WebApplication/Utilities/ITaskUtil.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace WebApplication.Utilities
4 | {
5 | public interface ITaskUtil
6 | {
7 | Task Sleep(int millis);
8 | }
9 |
10 | public class TaskUtil : ITaskUtil
11 | {
12 | public async Task Sleep(int millis)
13 | {
14 | await Task.Delay(millis);
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/WebApplication/Utilities/InviteOnlyChecker.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using System.Linq;
20 | using System.Net.Mail;
21 | using WebApplication.Definitions;
22 |
23 | public class InviteOnlyChecker
24 | {
25 | private readonly InviteOnlyModeConfiguration _inviteOnlyModeConfig;
26 |
27 | public InviteOnlyChecker(InviteOnlyModeConfiguration inviteOnlyModeConfig)
28 | {
29 | _inviteOnlyModeConfig = inviteOnlyModeConfig;
30 | }
31 |
32 | public bool IsInvited(string email)
33 | {
34 | if (_inviteOnlyModeConfig.Enabled)
35 | {
36 | bool isInDomains = false;
37 | if (_inviteOnlyModeConfig.Domains?.Length > 0)
38 | {
39 | MailAddress address = new MailAddress(email); // email comes from autodesk auth service so it should be in a valid format
40 | string host = address.Host;
41 | isInDomains = _inviteOnlyModeConfig.Domains.Contains(host);
42 | }
43 |
44 | bool isInAddresses = false;
45 | if (_inviteOnlyModeConfig.Addresses?.Length > 0)
46 | {
47 | isInAddresses = _inviteOnlyModeConfig.Addresses.Contains(email);
48 | }
49 |
50 | return isInDomains || isInAddresses;
51 | }
52 |
53 | return true;
54 | }
55 | }
--------------------------------------------------------------------------------
/WebApplication/Utilities/TempFile.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using System;
20 | using System.IO;
21 |
22 | namespace WebApplication.Utilities
23 | {
24 | ///
25 | /// Wrapper for temporary file, which is deleted on disposal.
26 | ///
27 | public class TempFile : IDisposable
28 | {
29 | ///
30 | /// Full filename of uniquely named, zero-byte temporary file on disk.
31 | ///
32 | public string Name { get; }
33 |
34 | public TempFile()
35 | {
36 | Name = Path.GetTempFileName();
37 | }
38 |
39 | public void Dispose()
40 | {
41 | File.Delete(Name);
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/WebApplication/Utilities/Web.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////////////////////////
2 | // Copyright (c) Autodesk, Inc. All rights reserved
3 | // Written by Autodesk Design Automation team for Inventor
4 | //
5 | // Permission to use, copy, modify, and distribute this software in
6 | // object code form for any purpose and without fee is hereby granted,
7 | // provided that the above copyright notice appears in all copies and
8 | // that both that copyright notice and the limited warranty and
9 | // restricted rights notice below appear in all supporting
10 | // documentation.
11 | //
12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16 | // UNINTERRUPTED OR ERROR FREE.
17 | /////////////////////////////////////////////////////////////////////
18 |
19 | using System.IO;
20 | using System.Net.Http;
21 | using System.Threading.Tasks;
22 |
23 | namespace WebApplication.Utilities
24 | {
25 | ///
26 | /// Web-related utilities.
27 | ///
28 | public static class Web
29 | {
30 | ///
31 | /// Download URL to the local file.
32 | ///
33 | public static async Task DownloadAsync(this HttpClient httpClient, string url, string localFile)
34 | {
35 | await using var httpStream = await httpClient.GetStreamAsync(url);
36 | await using var localStream = File.Create(localFile);
37 | await httpStream.CopyToAsync(localStream);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/WebApplication/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Processing": {
3 | "SaveReport": "All"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/WebApplication/appsettings.Local.template.json:
--------------------------------------------------------------------------------
1 | {
2 | "Forge": {
3 | "clientId": "",
4 | "clientSecret": "",
5 | "AuthenticationAddress": "https://developer.api.autodesk.com/authentication/v2/token",
6 | "DesignAutomation": {
7 | "BaseAddress": "https://developer.api.autodesk.com/da/us-east/"
8 | }
9 | },
10 | "embedded" : true
11 | }
--------------------------------------------------------------------------------
/WebApplication/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | },
9 | "AllowedHosts": "*",
10 | "AppBundleZipPaths": {
11 | "EmptyExe": "AppBundles/EmptyExePlugin.bundle.zip",
12 | "DataChecker": "AppBundles/DataCheckerPlugin.bundle.zip",
13 | "CreateSVF": "AppBundles/CreateSVFPlugin.bundle.zip",
14 | "CreateRFA": "AppBundles/RFAExportRCEPlugin.bundle.zip",
15 | "CreateBOM": "AppBundles/ExportBOMPlugin.bundle.zip",
16 | "CreateThumbnail": "AppBundles/CreateThumbnailPlugin.bundle.zip",
17 | "ExtractParameters": "AppBundles/ExtractParametersPlugin.bundle.zip",
18 | "UpdateParameters": "AppBundles/UpdateParametersPlugin.bundle.zip",
19 | "UpdateDrawings": "AppBundles/UpdateDrawingsPlugin.bundle.zip",
20 | "ExportDrawing": "AppBundles/ExportDrawingAsPdfPlugin.bundle.zip"
21 | },
22 | "DefaultProjects": {
23 | "Projects": [
24 | {
25 | "Url": "https://sdra-default-projects.s3.us-west-2.amazonaws.com/WrenchForm_2023.zip",
26 | "TopLevelAssembly": "Wrench.iam",
27 | "Name": "Wrench"
28 | },
29 | {
30 | "Url": "https://sdra-default-projects.s3.us-west-2.amazonaws.com/Wheel_multi_IDW_2023.zip",
31 | "TopLevelAssembly": "WheelAssembly.iam",
32 | "Name": "Wheel"
33 | }
34 | ]
35 | },
36 | "InviteOnlyMode": {
37 | "Enabled": false,
38 | "Domains": [ "autodesk.com" ],
39 | "Addresses": [ "adsk.demo.tool@gmail.com", "adsk.demo.tool+0@gmail.com" ]
40 | },
41 | "Processing": {
42 | "SaveReport": "ErrorsOnly"
43 | },
44 | "Serilog": {
45 | "MinimumLevel": {
46 | "Default": "Information",
47 | "Override": {
48 | "System": "Warning",
49 | "Microsoft.AspNetCore": "Warning",
50 | "Microsoft.Hosting.Lifetime": "Information"
51 | }
52 | }
53 | },
54 | "Publisher": {
55 | "CompletionCheck": "Polling",
56 | "CallbackUrlBase": "https://url-of-your-deployed-server-in-case-your-Publisher-CompletionCheck-is-Callback/complete/"
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/about.md:
--------------------------------------------------------------------------------
1 | # Autodesk Configuration with Design Automation for Inventor
2 | Using the Autodesk Configuration with Design Automation for Inventor web application one can easily manage and edit Inventor projects using only a web browser and an internet connection. The following operations are available:
3 | - manage custom Inventor projects (list, upload, delete)
4 | - interactively display the model
5 | - change editable parameters and update the model
6 | - list bill of materials
7 | - generate model drawing
8 | - download individual Inventor project assemblies (.IAM), Revit 3D model (.RFA), bill of material (.CSV) and model drawing (.PDF)
9 |
10 | The application is available using this link: https://inventor-config-demo.autodesk.io
11 |
12 | Non authenticated anonymous users can work with two predefined projects: Wheel and Wrench.
13 |
14 | The ability to upload custom projects is only for invited customers. Once you get the invitation, you need to authenticate using your Autodesk APS account. To sign up for the APS account, follow the instructions at https://aps.autodesk.com/.
15 |
16 | Every operation (i.e. model update after change of parameters, drawing creation) is computed in the cloud. For this purpose, Cloud Credits are required. Free Cloud Credits are provided to try APS after signing up. For more information about pricing, please see https://aps.autodesk.com/pricing.
17 |
--------------------------------------------------------------------------------
/cicd/BuildMachine/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM mcr.microsoft.com/dotnet/framework/sdk:4.8
2 |
3 | SHELL ["powershell.exe", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
4 |
5 | ADD InstallNode.ps1 .
6 | RUN ./InstallNode.ps1
7 |
8 | ENV NUGET_PACKAGES=c:\\sdra\\nuget
9 |
10 | ADD FontsToAdd.tar /Fonts/
11 |
12 | WORKDIR /Fonts/
13 | RUN ./Add-Font.ps1 Fonts
14 |
15 | WORKDIR /
16 | RUN Remove-Item Fonts -Recurse
--------------------------------------------------------------------------------
/cicd/BuildMachine/FontsToAdd.tar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/cicd/BuildMachine/FontsToAdd.tar
--------------------------------------------------------------------------------
/cicd/BuildMachine/InstallNode.ps1:
--------------------------------------------------------------------------------
1 | $nodeVer = "20.12.2"
2 |
3 | Invoke-WebRequest -OutFile nodejs.zip -UseBasicParsing "https://nodejs.org/dist/v${nodeVer}/node-v${nodeVer}-win-x64.zip"
4 |
5 | Expand-Archive nodejs.zip -DestinationPath C:\
6 |
7 | Rename-Item "C:\\node-v${nodeVer}-win-x64" c:\nodejs
8 |
9 | [Environment]::SetEnvironmentVariable("Path", $env:Path + ";c:\nodejs", [EnvironmentVariableTarget]::Machine)
--------------------------------------------------------------------------------
/cicd/BuildMachine/README.md:
--------------------------------------------------------------------------------
1 | # Windows build machine creation
2 | Those files were used to create Docker image for the Windows build machine. They need to be altered and re-used when there is a change in the build environment (like upgrade of .Net Framework or VisualStudio)
3 |
4 | Since UI tests run on this machine, we need working chromium to be installed and running there. The chromium installation is handled by npm module, but it does not run without several system fonts, which are not installed by default on windows server 2019. We need to install those fonts using dockerfile. Credists goes here https://github.com/prom3theu5/ServerCoreFonts
5 |
6 | Since the tight relation between the machine where is the image created and where it is used, it is recomended to run this on the EC2 macine (with the same version) if Windows which is used by CodeBuild.
7 | There might be a problem to log to Amazon ECR (docker registry) to push the resulting image. Following post helps with that: https://stackoverflow.com/questions/60807697/docker-login-error-storing-credentials-the-stub-received-bad-data
--------------------------------------------------------------------------------
/cicd/Dockerfile.image:
--------------------------------------------------------------------------------
1 | FROM mcr.microsoft.com/dotnet/aspnet:6.0
2 | COPY image/ app/
3 | COPY cicd/commands.sh app/
4 |
5 | WORKDIR /app
6 |
7 | RUN chmod +x commands.sh
8 |
9 | ENTRYPOINT ["./commands.sh"]
--------------------------------------------------------------------------------
/cicd/appsettings.Local.json:
--------------------------------------------------------------------------------
1 | {
2 | "clientIdCanDeleteUserBuckets": "",
3 | "Forge": {
4 | "clientId": "",
5 | "clientSecret": ""
6 | },
7 | "bucketKeySuffix" : ""
8 | }
--------------------------------------------------------------------------------
/cicd/be-tests.ps1:
--------------------------------------------------------------------------------
1 | . ./cicd/common.ps1
2 |
3 | Write-Output "**** running backend tests ****"
4 | dotnet test
5 | CheckLastExitCode
6 |
--------------------------------------------------------------------------------
/cicd/build.ps1:
--------------------------------------------------------------------------------
1 | . ./cicd/common.ps1
2 |
3 | Write-Output "**** Building ****"
4 | msbuild -restore /property:Configuration=Release
5 | CheckLastExitCode
6 | msbuild /property:Configuration=Release /Target:Publish
7 | CheckLastExitCode
8 |
--------------------------------------------------------------------------------
/cicd/buildAndTest.ps1:
--------------------------------------------------------------------------------
1 | .\\build.ps1
2 | .\\be-tests.ps1
3 | .\\linter.ps1
4 | .\\fe-tests.ps1
5 | .\\ui-tests.ps1
--------------------------------------------------------------------------------
/cicd/commands.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | dotnet WebApplication.dll bundles=true
--------------------------------------------------------------------------------
/cicd/common.ps1:
--------------------------------------------------------------------------------
1 | $ErrorActionPreference = "Stop"
2 |
3 | function CheckLastExitCode {
4 | param ([int[]]$SuccessCodes = @(0), [scriptblock]$CleanupScript=$null)
5 |
6 | if ($SuccessCodes -notcontains $LastExitCode) {
7 | if ($CleanupScript) {
8 | "Executing cleanup script: $CleanupScript"
9 | &$CleanupScript
10 | }
11 | $msg = @"
12 | EXE RETURNED EXIT CODE $LastExitCode
13 | CALLSTACK:$(Get-PSCallStack | Out-String)
14 | "@
15 | throw $msg
16 | }
17 | }
18 |
19 | $env:STOP_AFTER_FAIL="true"
20 | $env:embedded="true"
21 | $env:NODE_ENV="development"
22 | $doteNetRelease = "net6.0"
23 |
--------------------------------------------------------------------------------
/cicd/fe-tests.ps1:
--------------------------------------------------------------------------------
1 | . ./cicd/common.ps1
2 |
3 | Write-Output "**** running frontend tests ****"
4 | $slnDir=$PWD.ToString()
5 | Set-Location WebApplication/ClientApp
6 | npm test -- --coverage
7 | CheckLastExitCode
8 | Set-Location $slnDir
--------------------------------------------------------------------------------
/cicd/linter.ps1:
--------------------------------------------------------------------------------
1 | . ./cicd/common.ps1
2 |
3 | Write-Output "**** running linter ****"
4 | $slnDir=$PWD.ToString()
5 | Set-Location WebApplication/ClientApp
6 | npm run lint
7 | CheckLastExitCode
8 | Set-Location $slnDir
--------------------------------------------------------------------------------
/cicd/ui-tests.ps1:
--------------------------------------------------------------------------------
1 | . ./cicd/common.ps1
2 |
3 | xcopy /Y /E WebApplication\bin\Release\$doteNetRelease\publish\* output\uitest\
4 | xcopy /Y /E WebApplication\AppBundles\* output\uitest\AppBundles\
5 |
6 | $slnDir=$PWD.ToString()
7 |
8 | Write-Output "**** Starting the server ****"
9 | Set-Location output\uitest\
10 | $serverProcess = Start-Process -NoNewWindow dotnet -ArgumentList "WebApplication.dll", "clear=true", "initialize=true", "allowCleanSelf=true" -PassThru
11 | Set-Location $slnDir\WebApplication
12 | Write-Output "Waiting for server to initialize"
13 | ..\cicd\waitForServer.ps1
14 | Write-Output "**** running the UI tests ****"
15 | Set-Location ClientApp
16 | mkdir output
17 | try {
18 | npx codeceptjs run $env:UITestParams
19 | CheckLastExitCode
20 | }
21 | finally {
22 | Write-Host "==== Post Build phase ===="
23 | Set-Location $slnDir
24 | xcopy /Y /E WebApplication\ClientApp\output\* output\report\errorScreenShots\
25 | xcopy /Y /E WebApplication\ClientApp\coverage\* output\report\coverage\
26 |
27 | Write-Host "**** Shutting down the server ****"
28 | Stop-Process $serverProcess
29 | }
--------------------------------------------------------------------------------
/cicd/waitForServer.ps1:
--------------------------------------------------------------------------------
1 | # turn off warning about self-signed certificate
2 |
3 | if (-not("dummy" -as [type])) {
4 | add-type -TypeDefinition @"
5 | using System;
6 | using System.Net;
7 | using System.Net.Security;
8 | using System.Security.Cryptography.X509Certificates;
9 |
10 | public static class Dummy {
11 | public static bool ReturnTrue(object sender,
12 | X509Certificate certificate,
13 | X509Chain chain,
14 | SslPolicyErrors sslPolicyErrors) { return true; }
15 |
16 | public static RemoteCertificateValidationCallback GetDelegate() {
17 | return new RemoteCertificateValidationCallback(Dummy.ReturnTrue);
18 | }
19 | }
20 | "@
21 | }
22 |
23 | [System.Net.ServicePointManager]::ServerCertificateValidationCallback = [dummy]::GetDelegate()
24 |
25 | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
26 | while ($statusCode -ne 200) {
27 | # wait a bit between requests
28 | sleep 10
29 | # make request agains local server
30 | $statusCode = try {
31 | $responce = $(Invoke-WebRequest -Uri 'https://localhost:5001' -UseBasicParsing -ErrorAction Stop)
32 | $responce.StatusCode
33 | } catch {
34 | 404
35 | }
36 | }
37 |
38 | Write-Host "Server responded. Waiting is over."
--------------------------------------------------------------------------------
/img/APIs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/APIs.png
--------------------------------------------------------------------------------
/img/AppBundleZips.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/AppBundleZips.png
--------------------------------------------------------------------------------
/img/BuildSolution.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/BuildSolution.png
--------------------------------------------------------------------------------
/img/DebugApp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/DebugApp.png
--------------------------------------------------------------------------------
/img/Deploy/0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/0.png
--------------------------------------------------------------------------------
/img/Deploy/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/1.png
--------------------------------------------------------------------------------
/img/Deploy/10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/10.png
--------------------------------------------------------------------------------
/img/Deploy/11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/11.png
--------------------------------------------------------------------------------
/img/Deploy/12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/12.png
--------------------------------------------------------------------------------
/img/Deploy/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/2.png
--------------------------------------------------------------------------------
/img/Deploy/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/3.png
--------------------------------------------------------------------------------
/img/Deploy/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/4.png
--------------------------------------------------------------------------------
/img/Deploy/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/5.png
--------------------------------------------------------------------------------
/img/Deploy/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/6.png
--------------------------------------------------------------------------------
/img/Deploy/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/7.png
--------------------------------------------------------------------------------
/img/Deploy/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/8.png
--------------------------------------------------------------------------------
/img/Deploy/9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/9.png
--------------------------------------------------------------------------------
/img/DotnetRunInitialize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/DotnetRunInitialize.png
--------------------------------------------------------------------------------
/img/SuccessfulBuild.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/SuccessfulBuild.png
--------------------------------------------------------------------------------
/img/architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/architecture.png
--------------------------------------------------------------------------------
/thumbnail.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/thumbnail.gif
--------------------------------------------------------------------------------