Jump to content
Developer Wiki and Function Reference Links ×

Recordset for groups in VW


Skyfox01

Recommended Posts

[smile] Hello, [smile]

Is it possible to set more records in one Object.

My problem is, that i want to draw 4 rectangels, group them in 2 and 2 Rectangels and set to the first Group a record in DB1, to the second group of rectangels an entry in DB2. The last step in the script shall to set another entry in a third database DB3.

I have no problem to set an entry to a whole Object, but I never had success to set an DB entry to Group below the Object.

Does anyone know how to handle the scripts?

All helping responses are welcome!

Thank you! [smile]

Link to comment

Martin

If I understand you correctly,you may be looking for something like this:

BeginGroup;

BeginGroup;

Rect(-20,0,-10,-10);

Rect(0,0,10,-10);

EndGroup;

SetRecord(LNewObj,rec1);

BeginGroup;

Rect(20,0,30,-10);

Rect(40,0,50,-10);

EndGroup;

SetRecord(LNewObj,rec2);

EndGroup;

SetRecord(LNewObj,rec3);

This creates 2 groups within an enclosing group.All three groups have different records attached to them.

Does this help?

Charles

Link to comment

Hi Charles,

That is exactly what i am searching for!

Thank you!

There is another open point for me.

I hope you as an expert can help me to solve my problem.

I want to draw two ARCs like:

ArcByCenter(0,0,65,0,90);

ArcByCenter(0,0,100,0,90);

and then I want to use 'CLIP SURFACE' to cut the ARCs and delete the interior part of them.

For using the Clip surface order I need to know what S1 an S2 should be!

Thank you!

Link to comment

Not so much expert as intermediate.

I've never used ClipSurface,but I may be able to help you anyway.

ClipSurface is a predefined V-script procedure that takes 2 parameters of the variable type Handle.Every object in a document has a unique handle and we use it to tell the compiler which object to operate on. In this case there are two needed for the two arcs.The question is how do we get the handles.

If you look at the example in my previous reply, you will see: SetRecord(LNewObj, rec1)

LNewObj is a predefined V-script function that returns the handle of the last object created.You can probably use a similar idea for your new question. However,since you need 2 handles you will need to declare them as variables and then assign the handle from LNewObj to each accordingly, and then use these variables for S1 and S2. Do the assignment directly after calling each Arc.

You then need to get at the clipped off parts to delete them. I don't know the best way to do this off the top of my head....I'd have to do some tinkering. Which I don't really have time for at the moment.

I suggest that you search the archives of the VectorScript mailing list under Support. I'm pretty sure I've seen posts about this.You'll find this to be a very useful resource.

If you can't find your answer there try starting a new thread here with ClipSurface in the subject. Somebody here has the answer.

I hope this has been helpful.

Good Luck

Charles

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...