Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum [Type] for a ProjectWise Folder
    • Sign In

    • State Not Answered
    • Replies 5 replies
    • Subscribers 67 subscribers
    • Views 494 views
    • Users 0 members are here

    [Type] for a ProjectWise Folder

    Robert Biggar
    Offline Robert Biggar over 1 year ago

    I am passing a ProjectWise folder into a function for processing created with:

    $PWfolder = get-pwfolders -FolderID $TfolderID -JustOne 

    what do I use for the Type in the Parameters in my function?

    ==================================================

    [CmdletBinding()]
    param
    (
    [Parameter(Mandatory=$true)]
    [???]$PWFolder

    )

    ====================================================

    I tried "ProjectWiseFolder"...but that was not correct...didn't work, anyway.

    maybe I didn't  specify that type correctly...or give it the right location to find that type??

    "Object" works...

    ===================================================

    [CmdletBinding()]
    param
    (
    [Parameter(Mandatory=$true)]
    [Object]$PWFolder

    )

    ===================================================

    but that seems a little Generic...

    is that the only option, or is there a way to specify that this is a ProjectWise Folder.

    Advice??

    Thanks!

    Bob

    • Sign in to reply
    • Cancel
    Parents
    • Robert McMillan
      0 Offline Robert McMillan Sun, Jul 24 2022 6:44 PM

      You can inspect the input types for other cmdlets from the Command Add-on in PowerShell ISE. In this case it's a [PWPS_DAB.CommonTypes+ProjectWiseFolder]

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Robert McMillan
      0 Offline Robert McMillan Sun, Jul 24 2022 6:44 PM

      You can inspect the input types for other cmdlets from the Command Add-on in PowerShell ISE. In this case it's a [PWPS_DAB.CommonTypes+ProjectWiseFolder]

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    • Robert Biggar
      0 Offline Robert Biggar Mon, Jul 25 2022 7:18 AM in reply to Robert McMillan

      AH! It's always "right there" where you never thought to look...or just didn't pay attention.

      many thanks!!

      ...I wonder how many times I saw that...and just didn't read it??

      Just tested it...that was it.

      =====================================================

      [CmdletBinding()]
      param
      (
      [Parameter(Mandatory=$true)]
      [PWPS_DAB.CommonTypes+ProjectWiseFolder]$PWFolder

      )

      ======================================================

      Thank You!!

      Bob

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies