-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New-VisioShape Enhancement Request - Connect the new shape to an existing shape using it's connection point formula. #77
Comments
@mc1903 - what would you suggest as the syntax for this? |
Hello @MikeShepard As this would only pertain to rack & server shapes, I would suggest something like:
Where Some validation of the rack shape to would be ideal to confirm the U connection points are correctly labelled in the ShapeSheet as the HPE racks are, but the Dell ones are blank. VisioBot3000_New-VisioShape_RackConnectionLabels.pdf When specifying the Thanks, |
Adding rack-specific parameters to New-VisioShape is a very different thing than adding the ability to allow formulas for -x and -y parameters. |
Hello Mike, "Adding rack-specific parameters to New-VisioShape is a very different..." Yes, without a doubt it is far more involved. Apologies, I misunderstood your initial question about syntax. From what I now understand (which is limited) I am trying to work out which VBA method to call in order to update a shape's 1-D endpoints - do you happen to know what this might be? Thanks, |
I have a dirty working example now... I will try to create a new function
M |
I could see a version of New-VisioShape which had -XFormula and -YFormula ....would that work? Would it have to be -BeginXFormula, etc. (4 parameters)? |
Morning Mike, So I don't break the current Personally, I wouldn't use Looking at various vendor's rack shapes (HPE, Dell, IBM, Cisco), the formulas are slightly different. As far as I have found, irrespective of vendor I appreciate the downside to this approach is that the function will need to be updated for additional rack shapes if they have different 1-D endpoint formulas. Are there any other rack vendor shapes you use / would want to support? M |
Hi Mike, I have zip attached the updated You can test it with the following:
Let me know what you think. I can create a pull request if you want me to. M |
I'm glad you were able to get that working. I'm hesitant to add it to VisioBot3000 directly, because it's so shape-specific. What would you think about getting it added in the examples folder (probably with some instructions on downloading rack stencils)? |
Morning Mike, I understand your hesitance about adding it to VisioBot3000 directly. I would be happy to work on examples & instructions, but how best to make the Would you be agreeable to me creating a separate VisioBot3000AddOns or VisioBot3000Extras repo along with its own PowerShell Gallery install package? No replication of the existing VisioBot3000 functions, just a place to keep dependant custom functions that is apart from your main project. Cheers, |
Sorry about the slow response. I've thought some more about it and here are my conclusions:
So...if you will put together a pull request for the function (make sure to include comment-based help) and an example or 2 showing how to use it (a short example in the CBH would be awesome...an extended one in the Examples folder would be great too), I'll review and we'll see about getting it merged. If you'd like, I can still update the New-VisioShape function to allow formulas for x and y. That might simplify the New-RackShape function some. |
No worries Mike; we all have real lives to live. I tried moving the
I have an exam this Friday, so I am prepping for that at the moment. Towards the end of next week I have some time off, so I will create a PR once I have sorted the CBH and examples. I think updating M |
I'll try to get that updated (formulas) so you can use it as a springboard
for your PR.
…On Wed, Sep 22, 2021 at 11:22 AM mc1903 ***@***.***> wrote:
No worries Mike; we all have real lives to live.
I tried moving the New-VisioRackShape function out into it's own module,
but ran into issues as some of the variables/arrays ($Shapes and poss
$DroppedShape) are no longer available, I assume they are restricted to
the script: scope of the New-VisioShape or the Register-VisioShape
function.
New-VisioRackShape -Master HPEDL180Gen108LFF -Label Server1 -RackLabel Rack01 -RackVendor HPE -FirstU 1 -Verbose
Cannot index into a null array.
At C:\Program Files\WindowsPowerShell\Modules\VisioBot3000Extras\Src\Public\New-VisioRackShape.ps1:111 char:13
+ $Master=$script:Shapes[$Master]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
I have an exam this Friday, so I am prepping for that at the moment.
Towards the end of next week I have some time off, so I will create a PR
once I have sorted the CBH and examples.
I think updating New-VisioShape to accept formulas for x and y would be
great.
M
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKI2IWVXYWXMLP5DD6WBPTUDH7DPANCNFSM5DF7QEFA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi Mike,
In the example attached, I notice that when I manually move/connect the Server1 shape onto the Rack01 shape, that Server1's 1-D endpoints are changed to a formula referencing the Rack01 connection points. Would it be possible to change New-VisioShape to allow a formula to be specified for each of x & y, so it is connected to the existing shape on creation?
The shapes are from http://www.visiocafe.com/hpe.htm (HPE-Racks.vss is in HPE-Common.zip and HPE-ProLiant-DL.vss is in HPE-ProLiant.zip)
VisioBot3000_New-VisioShape.pdf
Thanks
M
The text was updated successfully, but these errors were encountered: