![]() |
|
![]() |
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
#1
|
|||
|
|||
inquire position and box dimension in Annotation
Hello,
i have a question, how i can inquire the box dimension and his coordinate of an element in Annotation using selection by S_DOCU_PART? thank you |
#2
|
||||
|
||||
![]() Quote:
Many macros are available as source code in the directory <ModelingInstDir>/Annotation/win. Look for all the lines with "DEFINE " in *.m files. There are basically 2 macros of interest Code:
DEFINE Docu_get_part_box Code:
DEFINE Docu_inq_part_box_coords Having that, you can call a function Code:
(display (sd-execute-annotator-function :fnc (format nil "Docu_inq_part_box_coords '~A' " (sd-am-inq-unique-name the-sel-item)))) If you are trying this on Modeling command line use (oli::sd-... instead of (sd-... __________________________________________ Inquiring the dimension of an element (e.g. an arc, a dimension) is much more complex.
__________________
|
#3
|
|||
|
|||
Re: inquire position and box dimension in Annotation
thank you very much Wolfgang,
the next days I develop my idea and send the result. |
#4
|
|||
|
|||
Re: inquire position and box dimension in Annotation
another question,
I want inquire the UPN via path, is it possible? I set DOCU::*DOCU-BROWSER-DISPLAY-ALL* value T, now I can see the 3D structure in Annotation (see image atthacment), single clic print the patrhname in console windows and double clic print the UPN number. Exist a function to inquire che UPN using in input the Pathname object? I found a funtion in .m file in <ModelingInstDir>/Annotation/win but I failure. thank you for your helps. Stefano S. |
#5
|
||||
|
||||
![]() Quote:
What you have described is not a double click/single click behaviour . It is the behaviour of clicking on the NAME in the drawing browser or clicking on the ICON in the drawing browser. When you click on the icon, the window is fitted to that object using the UPID. I added this years ago. BUT. The 2D pathname and 2D UPID information is already part of the drawing browser's internal information. Some of this is hidden from the end user. All the data is requested in one call for the whole tree displayed in the drawing browser (e.g. if you have X sheets with each YZ views, sketch symbols and so on). Therefore, the Drawing Browser has both in hand and uses them for 'click on name' and 'click on icon'. BUT . this 2D path name is not unique in the tree (unlike a 3D path name in Modellng).
Now you will have 3 object with identical pathname but with uniqe UPIDs. Code:
NIL(docu::docu-vp-fit-to-part "/~12") (docu::docu-vp-fit-to-part "/~13") (docu::docu-vp-fit-to-part "/~17") "1/Sketch042" "1/Sketch042" "1/Sketch042" Don't use 2D Pathname. - just my recommendation.
__________________
|
#6
|
|||
|
|||
![]()
thank you Wolfgang for your advise, I will change my strategy.
I need to study the integration kit more and more. |
#7
|
||||
|
||||
Re: inquire position and box dimension in Annotation
If you are not an expert in LISP, there is a book that is fun and educational called "Land of Lisp". It walks you through the basics and you build a game while doing it.
http://landoflisp.com/
__________________
Tom Kirkman Creo Elements/Direct 20.1 DELL Precision 7510 https://www.o-i.com |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|