hexagon logo

Passing Variables / Subroutine for PC-DMIS 2011 MR1

I'm new to subroutine and stuffs:

Managed to perform and callsub the subroutines out without problems but how do i exactly extract the data from the external program? (subroutine is stored in another external program, not within the main program itself). Don't really understand how the "passing variables" work, tried with all I can but never got it to work. and we can only extract the feature? not the dimension call-out for the feature? are they done in the main program, or in the external subroutine program?

Would love to hear solutions and insights from you guys, appreciate it much. Thank you!
Parents
  • This is old but.... This is awesome! I was in a 2 day long CODE battle when a google search turned this up. I can finally move on. You the ROCK !

    This led me to Pcdmis help file section: "IDs for Feature within Subroutines, Basic Scripts, or External Routines"

    I have 2 operations,

    op1: Export feature objects via an array to a Subroutine. Sub loops thru array and writes a line string containing feature data to a text file. 1 or 1000 features builds lines of data accordingly.

    op2: Open text file and loop thru every line in the file. Build generic feature on each loop plugging in data. Dimension sub features in main via "<Call Sub ID>:<FeatID>" and since it's a loop "<Call Sub ID>:<FeatID [n]>".

    No more typing out every feature in both OPs for every part! And no I can't use any other option in case your gear is turning.
Reply
  • This is old but.... This is awesome! I was in a 2 day long CODE battle when a google search turned this up. I can finally move on. You the ROCK !

    This led me to Pcdmis help file section: "IDs for Feature within Subroutines, Basic Scripts, or External Routines"

    I have 2 operations,

    op1: Export feature objects via an array to a Subroutine. Sub loops thru array and writes a line string containing feature data to a text file. 1 or 1000 features builds lines of data accordingly.

    op2: Open text file and loop thru every line in the file. Build generic feature on each loop plugging in data. Dimension sub features in main via "<Call Sub ID>:<FeatID>" and since it's a loop "<Call Sub ID>:<FeatID [n]>".

    No more typing out every feature in both OPs for every part! And no I can't use any other option in case your gear is turning.
Children
No Data