Highlight an element

All topics about specific development with COM interface, LIP language, API in VB, ...

Moderators: remi77, Daniel, jacs

Mark Oostveen
Chief
Chief
Posts: 107
Joined: Mon Mar 26, 2007 9:40 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6
Location: The netherlands
Contact:

Highlight an element

Unread post by Mark Oostveen » Mon Sep 28, 2015 1:21 pm

Hi,

I am looking for a way to Highlight an element or a group of elements like you use e.g. the group function inside TopSolid.
Usig this function you select one by one some elements and change color:

A alement usualy becomes red (or gray if origional color to close to red), and a shape becomes transparent. If selected a inserted component they all get selected and turn red like above.

What I want is put elements on the stack using the API and then highlight these elements.

With some help I tried to make a LIP using UWselectO, UWselectA and UWselectC. But altough it seems to run OK no highlighting appears. Does anybody has an idear?

Thanks

Mark
Last edited by Mark Oostveen on Thu Oct 01, 2015 10:36 am, edited 1 time in total.

Mark Oostveen
Chief
Chief
Posts: 107
Joined: Mon Mar 26, 2007 9:40 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6
Location: The netherlands
Contact:

Re: Highlight an element

Unread post by Mark Oostveen » Thu Oct 01, 2015 10:35 am

Ok
Well by analysing the group/create.lip I found out that the graphical echo on a selected element is not coming from UWselect but from the ask function.

So therefore I conclude that I cannot get the same behaviour if I want to skip the question as I have put the elements on stack using API.

Changing the attributes through API is also ( color red, transparant 5) not a solution as it is not always allowed to change these of inserted components. So if I want to highlight a element of such a component I get an error. Logic.

Anyone some other direction I can dig in to?

Grz.

Mark

gmanucci
Master Corporal
Master Corporal
Posts: 49
Joined: Tue Sep 29, 2015 2:48 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6

Re: Highlight an element

Unread post by gmanucci » Thu Oct 01, 2015 11:03 pm

what about drawing blocks?

btw i don't know how to get the screen position of this.

i'll work on that ASAP

Mark Oostveen
Chief
Chief
Posts: 107
Joined: Mon Mar 26, 2007 9:40 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6
Location: The netherlands
Contact:

Re: Highlight an element

Unread post by Mark Oostveen » Fri Oct 02, 2015 11:23 am

There is a function ZoomInElement so that gives you the element in the visible area of the screen.

What do you mean by drawing boxes? Like a enclosed block?

gmanucci
Master Corporal
Master Corporal
Posts: 49
Joined: Tue Sep 29, 2015 2:48 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6

Re: Highlight an element

Unread post by gmanucci » Fri Oct 02, 2015 8:44 pm

Image

Code: Select all

    
    Private Sub Form1_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        e.Graphics.DrawRectangle(Pens.Green, 10, 10, 200, 150)
    End Sub

Mark Oostveen
Chief
Chief
Posts: 107
Joined: Mon Mar 26, 2007 9:40 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6
Location: The netherlands
Contact:

Re: Highlight an element

Unread post by Mark Oostveen » Fri Oct 02, 2015 10:18 pm

Sorry I lost you. What is this doing? How does it "highlight" an element in the graphic area of TopSolid?

gmanucci
Master Corporal
Master Corporal
Posts: 49
Joined: Tue Sep 29, 2015 2:48 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6

Re: Highlight an element

Unread post by gmanucci » Sat Oct 03, 2015 2:32 am

aw, sry,

i didn't understand that to highlight an graphic object...

i did understand to highlight something on the GUI, like the Project Tree, operations Tree...

sry again!

gmanucci
Master Corporal
Master Corporal
Posts: 49
Joined: Tue Sep 29, 2015 2:48 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6

Re: Highlight an element

Unread post by gmanucci » Sat Oct 03, 2015 3:35 am

did u read about IUser Interface?

there you have some options like AskFace, Color, etc.

Mark Oostveen
Chief
Chief
Posts: 107
Joined: Mon Mar 26, 2007 9:40 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6
Location: The netherlands
Contact:

Re: Highlight an element

Unread post by Mark Oostveen » Wed Oct 14, 2015 11:28 am

no, there is none... Working with V6 :)

gmanucci
Master Corporal
Master Corporal
Posts: 49
Joined: Tue Sep 29, 2015 2:48 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6

Re: Highlight an element

Unread post by gmanucci » Mon Oct 19, 2015 8:50 pm

you do meaning it?

if on v6 have the GetColor and SetColor, we can do these things!

Image
Image
Image

Mark Oostveen
Chief
Chief
Posts: 107
Joined: Mon Mar 26, 2007 9:40 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6
Location: The netherlands
Contact:

Re: Highlight an element

Unread post by Mark Oostveen » Wed Oct 21, 2015 7:30 am

Buy in case of a component the attributes might be locked. Than your option does not work as it is not allowed to set the color.

But thanks for giving it a thought.

gmanucci
Master Corporal
Master Corporal
Posts: 49
Joined: Tue Sep 29, 2015 2:48 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6

Re: Highlight an element

Unread post by gmanucci » Wed Oct 21, 2015 1:46 pm

are you using assembly file?

i got the shapes getting all elements then using the TopSolidHost.Elements.IsColorModifiable(ElementId), now i can manipulate these list...

i'm not using the TopSolidHost.Shapes.GetShapes(ElementId) > this returns nothing on assembly file (with components).

http://i.imgur.com/00KCvg7.png
http://i.imgur.com/6MRYaVj.png
http://i.imgur.com/9iRTYcb.png
http://i.imgur.com/jUUazvF.png

Mark Oostveen
Chief
Chief
Posts: 107
Joined: Mon Mar 26, 2007 9:40 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6
Location: The netherlands
Contact:

Re: Highlight an element

Unread post by Mark Oostveen » Wed Oct 21, 2015 4:48 pm

That's TopSolid V7. I am using TopSolid'Wood which is still in V6.

Post Reply