navigate  
  Home
Contact Us
Store
Library
Forums
 
     

  Forums

Forums » Customization » Position in layout mode Messages in this topic - RSS
|
22.11.2004 06:19:49


Posts

// How I can get the coordinate of a position in an instance view in mode model
// but not in absolu of the layout.
// actually If I select a position in an active instance I have the
// XYZ coordinates of the layout but not the position on the model.
// -----------------------------------------------------------
// IN CK19 I have several funtions.
// ly_sel_instance "Select an instance view :", inst_id
//       For select a instance view
// ly_invpointtrans inst_id, X0, Y0, Z0, vX0, vY0, vZ0
//       This function transform the coordinates
//       wordl layout coordinates to Model coordinates 
// Do you have the same functions in KXL KC4.0 ?


:depart
// ********************************************************
//    Indiquer origine du repere
// ********************************************************
CLEAR hLocAnchor,hLabel,a,$Sdir1,$Sdir2
CLEAR xdir1,ydir1,zdir1,xdir2,ydir2,zdir2
HLOCATION hLocAnchor,hLabel
INT a
STRING $Sdir1,$Sdir2
DOUBLE Xdir1,Ydir1,Zdir1,Xdir2,Ydir2,Zdir2


:_origine
a=3
GETPOS "Sélection de l'origine(0,0,0):",a,hLocAnchor
IF (@KEY==-2)
        GOTO FINPROG
IF (@KEY==-3)
        GOTO FINPROG
a=@KEY


LOCATIONCOORD hLocAnchor,XBASE,YBASE,ZBASE
   
$Sdir1="X"
$Sdir2="Y" 


:_origdir1       
GETPOS "Indiquer la position de l'axe X",a,hLocAnchor
IF (@KEY==-2)
        GOTO origine
IF (@KEY==-3)
        GOTO FINPROG
a=@KEY


LOCATIONCOORD hLocAnchor,Xdir1,Ydir1,Zdir1


GETPOS "Indiquer la position de l'axe Y",a,hLocAnchor
IF (@KEY==-2)
        GOTO origdir1
IF (@KEY==-3)
        GOTO FINPROG
a=@KEY


LOCATIONCOORD hLocAnchor,Xdir2,Ydir2,Zdir2


// *** coordonnees in the instance view *****



CLEAR TabCoord
DOUBLE TabCoord[0]
ARRAY TabCoord[3]


    TabCoord[0]=XBASE
    TabCoord[1]=YBASE
    TabCoord[2]=ZBASE


PAUSE "X:%.2f, Y:%.2f, Z:%.2f",TabCoord[0],TabCoord[1],TabCoord[2]


//    TRANSFORMATION IN MODE MODEL COORDINATES


PAUSE "X:%.2f, Y:%.2f, Z:%.2f",TabCoord[0],TabCoord[1],TabCoord[2]

22.11.2004 07:45:16
CKDExpert
CKDExpert
Posts 131

Paris Yves,
My first guess is to make the inctance active before you use the macro.
I believe that it works just like the ordinate dimension does, you first have to make the instance active then select the options you want however remember that you cant go from one instance to another with out making the instace active agian.


Ken Harris

22.11.2004 07:57:58


Posts

The view instance is active when I execute the KXL program but the coordinates are always in ABSOLU.


I don't know if there is a function is KXL to active an instance view.


Thank you for your reply.

22.11.2004 08:16:39
CKDExpert
CKDExpert
Posts 131

Are you selecting Geometry or a point(not a "point") in space?
If you are then it is not associated to the instance.


I am just running through the options. 

22.11.2004 08:24:53


Posts

I am selecting a position (end ent) on a solid in the instance view and the coordinates XYZ are in absolu 0,0,0 of the layout.


I want the coordinates of the position to the model in the instance view. 

22.11.2004 09:39:24
CKDExpert
CKDExpert
Posts 131

Can I ask what you  want the CDL/KXL to Do?
I had the same problem when I wrote a macro for getting some dimesions from layout mode and placing them as a note.


If I could know what your end result is maybe I could find you a work around!

pages: 1
|

Forums » Customization » Position in layout mode