michaelk Posted August 17, 2012 Share Posted August 17, 2012 (edited) If I understand correctly ActSymDef returns the handle to the active symbol in the RB. Assuming that symbol is hybrid or 3D, how does one insert it into the drawing at coordinates x,y,z and a given rotation? Symbol(symbolname,x,y,rotation) doesn't allow for a z coordinate..... thanks mk Edited August 17, 2012 by michaelk Quote Link to comment
MullinRJ Posted August 18, 2012 Share Posted August 18, 2012 Symbol('3D Sym', 0, 0, #0); ResetOrientation3D; Rotate3D(#11, #22, #55);???{ final rotation } Move3D(1, 2, 3);???{ final insertion point location } Hi Michael, ???You could, of course, make a procedure to do this if you were going to place a lot of symbols. This assumes the User Origin is unmoved. Raymond Quote Link to comment
michaelk Posted August 18, 2012 Author Share Posted August 18, 2012 Thanks, Raymond. I'll try that. (in my drawings the User Origin is always unmoved ! :-) mk Quote Link to comment
michaelk Posted August 18, 2012 Author Share Posted August 18, 2012 Just so I can understand this better... Is there a logic to this method that I'm not seeing? I sort of expected there to be a Symbol3D() function that was a 3D analog of Symbol(). Thanks mk Quote Link to comment
michaelk Posted August 18, 2012 Author Share Posted August 18, 2012 I'm attempting to write a script, a piece of which takes information about one symbol and inserts the active symbol in the same place. Could be 2D, 3D, or Hybrid. There is a Replace... button in the OIP for every symbol. Am I correct that there is no function for that? Assuming there isn't: 2D is simple. Hybrid is pretty simple. I think I've got that one figured out. But what if the existing symbol is 3D only? How do I query the existing symbol about it's 3D rotation? And how do I ask any symbol if it is scaled symmetrically or asymmetrically and what the factors are? Thanks for all the help! mk Quote Link to comment
MullinRJ Posted August 18, 2012 Share Posted August 18, 2012 Second post first... Scaling mode is ObjVar 101, see appendix. Scale factors are ObjVars are 102, 103, 104. Symbol position - GetSymLoc3D(H, X, Y, Z); Symbol rotation - Boo := Get3DOrientation(H, Xrot, Yrot, Zrot, SymFlip); No, there is a replace function. - SetHDef(). This one is hard to remember, and is NOT found in the Symbol section. Knowing it exists helps to find it, but not by much. Raymond Quote Link to comment
MullinRJ Posted August 18, 2012 Share Posted August 18, 2012 Is there a logic to this method that I'm not seeing? I sort of expected there to be a Symbol3D() function that was a 3D analog of Symbol(). Michael, ???The logic comes from reading the VS Export file and seeing how NV deals with it. For modularity and ease of use, I define my own functions to fill in the VS gaps. ???In this case: procedure Symbol3D(Sym :String; X, Y, Z, Xr, Yr, Zr :Real); { Place a 3D Symbol in the drawing at the specified 3D point and rotations. } Begin Symbol (Sym, 0, 0, #0); ResetOrientation3D; SetRot3D (LNewObj, Xr, Yr, Zr, 0, 0, 0); Move3DObj (LNewObj, X, Y, Z); End; { Symbol3D } ???This is off the top of my head, so please test it thoroughly before using it. Setting the flip state is a little more involved. I'll leave that to you for extra credit. HTH, Raymond Quote Link to comment
michaelk Posted August 18, 2012 Author Share Posted August 18, 2012 Thanks, Raymond. I would never have found SetHDef(). mk Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.