Repository navigation
Glc showcase - #391
Closed
whamm86 wants to merge 18 commits into
Closed
Glc showcase#391whamm86 wants to merge 18 commits into
whamm86 wants to merge 18 commits into
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… empty catch block' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…into glc_showcase
|
|
Comment on lines
+284
to
+287
| catch (Exception ex) | ||
| { | ||
| Console.WriteLine($"{ViewerRootEnvVar} invalid, {ViewerRequestPath} not mapped: {ex.Message}"); | ||
| } |
| if (p is SubmodelElementList) | ||
| { | ||
| //for now only take first image | ||
| idShortPath = (p as ISubmodelElement).IdShort + "[0]" + idShortPath; |
| } | ||
| else if (p is ISubmodelElement) | ||
| { | ||
| idShortPath = (p as ISubmodelElement).IdShort + "." + idShortPath; |
Comment on lines
+102
to
+105
| catch (Exception ex) | ||
| { | ||
| Console.Error.WriteLine($"GetImageLink failed: {ex}"); | ||
| } |
| { | ||
| if (string.IsNullOrEmpty(_input)) | ||
| { | ||
| _input = "anonymous"; |
Comment on lines
+3325
to
+3353
| foreach (var v in sm.SubmodelElements) | ||
| { | ||
| if (v is SubmodelElementCollection c) | ||
| { | ||
| if (c.IdShort == "GeneralInformation") | ||
| { | ||
| foreach (var sme in c.Value) | ||
| { | ||
| if (sme is AasCore.Aas3_1.File f) | ||
| { | ||
| if (f.IdShort == "ManufacturerLogo" || f.IdShort == "CompanyLogo") | ||
| glcNode.manufacturerLogo = f; | ||
| if (f.IdShort == "ProductImage") | ||
| glcNode.productImage = f; | ||
| } | ||
| if (sme.IdShort == "ProductImages" && sme is SubmodelElementList l) | ||
| { | ||
| if (l.Value != null && l.Value[0] is SubmodelElementCollection cc) | ||
| { | ||
| if (cc.Value?[0].IdShort == "ImageFile" && cc.Value[0] is AasCore.Aas3_1.File ff) | ||
| { | ||
| glcNode.productImage = ff; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
Comment on lines
+3327
to
+3352
| if (v is SubmodelElementCollection c) | ||
| { | ||
| if (c.IdShort == "GeneralInformation") | ||
| { | ||
| foreach (var sme in c.Value) | ||
| { | ||
| if (sme is AasCore.Aas3_1.File f) | ||
| { | ||
| if (f.IdShort == "ManufacturerLogo" || f.IdShort == "CompanyLogo") | ||
| glcNode.manufacturerLogo = f; | ||
| if (f.IdShort == "ProductImage") | ||
| glcNode.productImage = f; | ||
| } | ||
| if (sme.IdShort == "ProductImages" && sme is SubmodelElementList l) | ||
| { | ||
| if (l.Value != null && l.Value[0] is SubmodelElementCollection cc) | ||
| { | ||
| if (cc.Value?[0].IdShort == "ImageFile" && cc.Value[0] is AasCore.Aas3_1.File ff) | ||
| { | ||
| glcNode.productImage = ff; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
Comment on lines
+3340
to
+3349
| if (sme.IdShort == "ProductImages" && sme is SubmodelElementList l) | ||
| { | ||
| if (l.Value != null && l.Value[0] is SubmodelElementCollection cc) | ||
| { | ||
| if (cc.Value?[0].IdShort == "ImageFile" && cc.Value[0] is AasCore.Aas3_1.File ff) | ||
| { | ||
| glcNode.productImage = ff; | ||
| } | ||
| } | ||
| } |
Comment on lines
+3342
to
+3348
| if (l.Value != null && l.Value[0] is SubmodelElementCollection cc) | ||
| { | ||
| if (cc.Value?[0].IdShort == "ImageFile" && cc.Value[0] is AasCore.Aas3_1.File ff) | ||
| { | ||
| glcNode.productImage = ff; | ||
| } | ||
| } |
Comment on lines
+3375
to
+3379
| if (ls.Language.ToLower() == "de") | ||
| { | ||
| if (s != null) | ||
| s = ls.Text; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List
any dependencies that are required for this change.
Motivation and Context
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Screenshots (if appropriate):
Checklist: