SimplifiedLogic / creoson

OpenSource Automation using JSON Transactions for PTC's CREO Parametric
http://www.creoson.com
MIT License
81 stars 23 forks source link

Combined views #38

Closed Zepmanbc closed 4 years ago

Zepmanbc commented 4 years ago

Hello,

is there a way to list and activate combined views?

Thanks

davidhbigelow commented 4 years ago

I would be surprised if there was a way to do that with the JLINK api.... will check.

But ... can you accomplish that with a Mapkey as an alternative?

On Mon, Jan 27, 2020 at 9:30 AM Zepmanbc notifications@github.com wrote:

Hello,

is there a way to list and activate combined views?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SimplifiedLogic/creoson/issues/38?email_source=notifications&email_token=AAMSRJOVWAO3H7Q23W4JMCTQ73VZDA5CNFSM4KMCHCW2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4II57GZQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMSRJISUKGIKGSGTNQF3DTQ73VZDANCNFSM4KMCHCWQ .

-- David Bigelow, President Simplified Logic, Inc https://www.simplifiedlogic.com | SimilarParts.ai C: 317-431-5454

Zepmanbc commented 4 years ago

I can obtain the result of a combined view with views, sections, etc... But i cannot have combined view's list with a mapkey. I want to get the list of theses views to extract pictures for a visual checking but combined views number and name will change for each file.

DieSwartKat commented 4 years ago

If you write a mapkey that save the list into a text file you should be able to use a small program to read the text files. This program can then edit a mapkey that will save a picture of each combined view, based on the name.

This mapkey saves a list of all the combine views:

mapkey allstates @MAPKEY_NAMEExport AllStates;@MAPKEY_LABELExport AllStates;\
mapkey(continued) ~ Command `ProCmdViewVisTool` ;\
mapkey(continued) ~ Select `visual_dlg0` `RadioSelApplMgr` 1 `combined`;\
mapkey(continued) ~ Select `visual_dlg0` `DisplayCascadeBtn`;\
mapkey(continued) ~ Close `visual_dlg0` `DisplayCascadeBtn`;\
mapkey(continued) ~ Activate `visual_dlg0` `ListZones`;\
mapkey(continued) ~ FocusIn `texttool` `textPH.TextArea`;\
mapkey(continued) ~ Select `texttool` `MenuBar` 1 `FileMenu`;\
mapkey(continued) ~ Activate `texttool` `texttool`;\
mapkey(continued) ~ Close `texttool` `MenuBar`;\
mapkey(continued) ~ Activate `texttool` `SaveAsPushButton`;\
mapkey(continued) ~ Update `file_saveas` `Inputname` \
mapkey(continued) `C:\\PTC\\Bar_Start_Creo\\Drawing-exchange\\allstates.txt`;\
mapkey(continued) ~ Activate `file_saveas` `Inputname`;\
mapkey(continued) ~ FocusIn `texttool` `textPH.TextArea`;\
mapkey(continued) ~ Activate `texttool` `CloseButton`;\
mapkey(continued) ~ Activate `visual_dlg0` `CloseBtn`;

note - using CREO 3.0 M050 (Not sure if new versions work the same) If the above doesn't work simply record the mapkey, save it and edit what you want changed.

You might want to edit the folder in which to save the text file.

I normally use python, which I can use to read the allstates.txt file get the list of combine views. In this case, I will get another mapkey together to activate the combined view and then save the view to a jpg (I assume that is what you mean by visual checking).

If you have a list of files that you want to run the above through you could get your code to loop through each file and repeat it over and over.

Note that it is hard to discover errors in mapkeys so if you find you getting stuck, simply run the code to where you see it working and then check the next line till you find your errors.

This is a bit dirty, but I use this all the time to get tasks done that doesn't have JLINK functionality.

Hope I understood your request right.

Zepmanbc commented 4 years ago

Thank you @DieSwartKat , i will try this 👍

edit: i did not have in mind that logs or other datas were saveable in text files, that's great!

davidhbigelow commented 4 years ago

It appears that is possible.... just not through JLINK... It appears to be reserved for ObjectToolkit.... which is a licensed product.

So I would try a mapkey or something to trigger the events you are looking to accomplish.

Dave

On Mon, Jan 27, 2020 at 9:30 AM Zepmanbc notifications@github.com wrote:

Hello,

is there a way to list and activate combined views?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SimplifiedLogic/creoson/issues/38?email_source=notifications&email_token=AAMSRJOVWAO3H7Q23W4JMCTQ73VZDA5CNFSM4KMCHCW2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4II57GZQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMSRJISUKGIKGSGTNQF3DTQ73VZDANCNFSM4KMCHCWQ .

-- David Bigelow, President Simplified Logic, Inc https://www.simplifiedlogic.com | SimilarParts.ai C: 317-431-5454

Zepmanbc commented 4 years ago

Thank you Dave

DieSwartKat commented 3 years ago

Thank you @DieSwartKat , i will try this 👍

edit: i did not have in mind that logs or other datas were saveable in text files, that's great!

Was just going back to find out if there were indeed a feature in CREOSON for allstates and I come accross my own advice.