Jump to content
Developer Wiki and Function Reference Links ×

inserting 3D symbol


michaelk

Recommended Posts

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 by michaelk
Link to comment

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

Link to comment

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

Link to comment

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

Link to comment
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

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...