Hot News:

Mit Unterstützung durch:

  Foren auf CAD.de (alle Foren)
  PTC Creo Elements/Programmierung
  get_selection in Anno

Antwort erstellen  Neues Thema erstellen
CAD.de Login | Logout | Profil | Profil bearbeiten | Registrieren | Voreinstellungen | Hilfe | Suchen

Anzeige:

Darstellung des Themas zum Ausdrucken. Bitte dann die Druckfunktion des Browsers verwenden. | Suche nach Beiträgen nächster neuer Beitrag | nächster älterer Beitrag
  
Gut zu wissen: Hilfreiche Tipps und Tricks aus der Praxis prägnant, und auf den Punkt gebracht für Creo
Autor Thema:  get_selection in Anno (589 mal gelesen)
Andylau
Mitglied



Sehen Sie sich das Profil von Andylau an!   Senden Sie eine Private Message an Andylau  Schreiben Sie einen Gästebucheintrag für Andylau

Beiträge: 55
Registriert: 07.06.2021

erstellt am: 08. Sep. 2021 10:50    Editieren oder löschen Sie diesen Beitrag!  <-- editieren / zitieren -->   Antwort mit Zitat in Fett Antwort mit kursivem Zitat    Unities abgeben: 1 Unity (wenig hilfreich, aber dennoch)2 Unities3 Unities4 Unities5 Unities6 Unities7 Unities8 Unities9 Unities10 Unities


hide.lsp.txt

 
Dear friends,

I have a problem in annotation about get_selection.
For example, I want to hide the calculated lines in a specified view, and keep the manual lines in the view unhide.
I used get_selection but failed.
The main problem is

:select-attribute :docu-calc-geo-only

This code doesn't work well. So how to solve this problem?

Code:

(sd-call-cmds (get_selection

;:select-attribute :docu-calc-geo-only
:focus_type *sd-anno-line-seltype*
:select
:by_view_docu_geo view
)
)


Thanks and regards!

Andy

[Diese Nachricht wurde von Andylau am 08. Sep. 2021 editiert.]

Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP

der_Wolfgang
Ehrenmitglied V.I.P. h.c.
Tastenhauer


Sehen Sie sich das Profil von der_Wolfgang an!   Senden Sie eine Private Message an der_Wolfgang  Schreiben Sie einen Gästebucheintrag für der_Wolfgang

Beiträge: 2017
Registriert: 3.20.

● PE60+80@home
● W10 Pro Build19044.2364
● Drafting V17~V20.5.1
● Modeling V17~V20.5.1

erstellt am: 08. Sep. 2021 13:53    Editieren oder löschen Sie diesen Beitrag!  <-- editieren / zitieren -->   Antwort mit Zitat in Fett Antwort mit kursivem Zitat    Unities abgeben: 1 Unity (wenig hilfreich, aber dennoch)2 Unities3 Unities4 Unities5 Unities6 Unities7 Unities8 Unities9 Unities10 Unities Nur für Andylau 10 Unities + Antwort hilfreich

● what's the length of the varialbe "lines" ??   I assume it's the correct numer (test it with a cube and a standard view!

● I bet the call of AM_HIDE you are using is wrong. AM_HIDE is a parallel dialog and you are not using any keywords in your call. That won't work at all.

Code:
(am_hide :calc_geo :On :geo the-lines)
something similar like that I expect.

● Learn to ==>> better record correct command sequences to have a fine code template

● last but not least:  you should not call another action (here AM_HIDE) in a loop for each and every element of a list when the called action can handle multiple selection by it's own

By reading your code the problem is not get_selection but the am_hide call IMHO.

------------------
Firefox ESRJava Forum Stuttgart JUGS ● OSD Hilfeseite (de) / help page (en)NotePad++BuFDi

[Diese Nachricht wurde von der_Wolfgang am 08. Sep. 2021 editiert.]

Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP

Andylau
Mitglied



Sehen Sie sich das Profil von Andylau an!   Senden Sie eine Private Message an Andylau  Schreiben Sie einen Gästebucheintrag für Andylau

Beiträge: 55
Registriert: 07.06.2021

erstellt am: 08. Sep. 2021 14:37    Editieren oder löschen Sie diesen Beitrag!  <-- editieren / zitieren -->   Antwort mit Zitat in Fett Antwort mit kursivem Zitat    Unities abgeben: 1 Unity (wenig hilfreich, aber dennoch)2 Unities3 Unities4 Unities5 Unities6 Unities7 Unities8 Unities9 Unities10 Unities


test.jpg

 
Hi der_Wolfgang,

Thanks for your tips of AM_hide, and I will take your advice for AM_hide.
But am_hide is not my target.(But my am_hide works) It's just an example for illustration.

See the picture attached.
I just want to choose the red lines in the view (in the green box).
But I don't want to choose the 2 lines in yellow(manual lines).

So after the get_selection , I will get a list of lines, which just including the calculated lines.

https://support.ptc.com/help/creo_elements_direct/r20.4.0.0/advanced_documentation/integration_kit/concepts/annotation/anno_sel.html#list

Thanks a lot!
Andy

Zitat:
Original erstellt von der_Wolfgang:
● what's the length of the varialbe "lines" ??   I assume it's the correct numer (test it with a cube and a standard view!

● I bet the call of AM_HIDE you are using is wrong. AM_HIDE is a parallel dialog and you are not using any keywords in your call. That won't work at all.

Code:
(am_hide :calc_geo :On :geo the-lines)
something similar like that I expect.

● Learn to ==>> better record correct command sequences to have a fine code template

● last but not least:  you should not call another action (here AM_HIDE) in a loop for each and every element of a list when the called action can handle multiple selection by it's own

By reading your code the problem is not get_selection but the am_hide call IMHO.


Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP

Andylau
Mitglied



Sehen Sie sich das Profil von Andylau an!   Senden Sie eine Private Message an Andylau  Schreiben Sie einen Gästebucheintrag für Andylau

Beiträge: 55
Registriert: 07.06.2021

erstellt am: 09. Sep. 2021 10:52    Editieren oder löschen Sie diesen Beitrag!  <-- editieren / zitieren -->   Antwort mit Zitat in Fett Antwort mit kursivem Zitat    Unities abgeben: 1 Unity (wenig hilfreich, aber dennoch)2 Unities3 Unities4 Unities5 Unities6 Unities7 Unities8 Unities9 Unities10 Unities

Or in other words, I just want to select the calculated lines in a view, but without manual lines included.
How to realize?

It seems the code
:select-attribute :docu-calc-geo-only
can only be used in variables, not in get_selection.

Thanks!
Andy


Zitat:
Original erstellt von Andylau:
Hi der_Wolfgang,

Thanks for your tips of AM_hide, and I will take your advice for AM_hide.
But am_hide is not my target.(But my am_hide works) It's just an example for illustration.

See the picture attached.
I just want to choose the red lines in the view (in the green box).
But I don't want to choose the 2 lines in yellow(manual lines).

So after the get_selection , I will get a list of lines, which just including the calculated lines.

https://support.ptc.com/help/creo_elements_direct/r20.4.0.0/advanced_documentation/integration_kit/concepts/annotation/anno_sel.html#list

Thanks a lot!
Andy


Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP

Anzeige.:

Anzeige: (Infos zum Werbeplatz >>)

Darstellung des Themas zum Ausdrucken. Bitte dann die Druckfunktion des Browsers verwenden. | Suche nach Beiträgen

nächster neuerer Beitrag | nächster älterer Beitrag
Antwort erstellen


Diesen Beitrag mit Lesezeichen versehen ... | Nach anderen Beiträgen suchen | CAD.de-Newsletter

Administrative Optionen: Beitrag schliessen | Archivieren/Bewegen | Beitrag melden!

Fragen und Anregungen: Kritik-Forum | Neues aus der Community: Community-Forum

(c)2023 CAD.de | Impressum | Datenschutz