CoCreate User Forum

CoCreate User Forum (https://www.cocreateusers.org/forum/index.php)
-   Customization (https://www.cocreateusers.org/forum/forumdisplay.php?f=12)
-   -   inquire flat view attributes (https://www.cocreateusers.org/forum/showthread.php?t=8208)

rvn 04-21-2015 04:04 AM

inquire flat view attributes
 
Does someone know how to inquire the :base_face, :flat_origin and :flat_direction of a flat view in annotation. I tried to do it with (sd-am-inq-view), but I can't find these things.
We already create one flat view, but we want to have a sheet with a second flat that is completely the same like the first flat. So it would be handy to get these attributes out of the first one.

Can anyone know how to inquire this?
thanks in advance

tom kirkman 04-21-2015 07:29 AM

Re: inquire flat view attributes
 
I am not completely sure, Maybe this will give you what you need.

(sd-am-inq-view-settings view)

Tom

rvn 04-21-2015 10:39 PM

Re: inquire flat view attributes
 
Tom thanks for your reply, but view-settings only shows the color of the linetypes and so on.

John van Doorn 05-15-2015 11:08 AM

Re: inquire flat view attributes
 
You can use
Code:

(DOCU::DOCU-GET-FLAT-INFOS "~21")
Where "~21" is the unique drafting part number, this will return a complete structure of the flat view eg.:
Code:

(:GENERATE-STRING
            "( SHA_UNFOLD :BASE_FACE (SHA-GET-FACE-BY-SYSID \"093551-1431716069-1c42c54d36-0 759\" \"093551-1431716069-1c42c54d36-0 2434\") :LIST_ERROR_MESSAGES_ONLY :ON :LOCAL_FLAT_ORIGIN 94.0,2.0,0.0 :LOCAL_FLAT_DIRECTION -1.0,0.0,0.0  :OUTPUT_TO_VP :OFF :OUTPUT_TO_ME10 :ON :FILENAME :OFF :SUMMARY :OFF :BEND_ALLOWANCE_SHOP  :CONE_BEND_ALLOWANCE_SHOP  :SHARP_BEND_RADIUS 0.4 :DOCU_VIEW_NAME \"sha-flat1\" :SD_V \"093551-1431716069-1c42c54d36-0 1365504905\")"
            :PART-SYSID "093551-1431716069-1c42c54d36-0 759"
            :FACE-SYSID "093551-1431716069-1c42c54d36-0 2434"
            :SHOP-NAME "demoshop" :ENV-STRING
            "(mbu_set_flat_environment 0.4 0 16711680 255 255 32768 16711680 32768 16711680 32768 32768 16744448 16744448 32768 16711680 32768 16711680 32768 32768 32768 16711680 32768 16711680 32768 32768 0 1 3.5 0 0 0 0 0 T T T T 0 \"sha-flat\" T NIL 0.5 \"UP\" \"DOWN\" \"R\" \"ANG\" 3 3 T NIL NIL NIL T T T T 8421631 15132390 T T T 1 7 T T T T 8421631 15132390 NIL 16711935 16711935)"
            :LIST_ERROR_MESSAGES_ONLY :ON :LOCAL_FLAT_ORIGIN
            94.0,2.0,0.0 :LOCAL_FLAT_DIRECTION
            -1.0,0.0,0.0 :BEND_ALLOWANCE_FIXED NIL :CONE_ALLOWANCE NIL
            :SHARP_BEND_RADIUS 0.40000000000000002 :DOCU_VIEW_NAME
            "sha-flat1" :SD_V
            "093551-1431716069-1c42c54d36-0 1365504905")

This should give all the information you need.

John

rvn 05-18-2015 01:24 AM

Re: inquire flat view attributes
 
Hi John,

This code did the trick.

Thank you

Ruben

jkramer 05-18-2015 01:26 AM

Re: inquire flat view attributes
 
Wow, nice command, John!
Brings me to a question... I'm always fighting a bit with calling Drafting stuff in Lisp... how di I inquire the drafting part name of the Flat View in Lisp???
Thnx,
Jaap

rvn 05-18-2015 01:49 AM

Re: inquire flat view attributes
 
Hi Jaap,

Whit this command you should be able to get the name of the first flat on the current sheet.
Code:

(display (sd-am-inq-name (first (sd-am-sheet-struct-flats (sd-am-inq-sheet (sd-am-inq-curr-sheet))))))
kind regards

jkramer 05-19-2015 01:01 AM

Re: inquire flat view attributes
 
Great, thnx!!


All times are GMT -8. The time now is 12:00 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.