Page 1 of 1
Highlight an element
Posted: Mon Sep 28, 2015 1:21 pm
by Mark Oostveen
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
Re: Highlight an element
Posted: Thu Oct 01, 2015 10:35 am
by Mark Oostveen
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
Re: Highlight an element
Posted: Thu Oct 01, 2015 11:03 pm
by gmanucci
what about drawing blocks?
btw i don't know how to get the screen position of this.
i'll work on that ASAP
Re: Highlight an element
Posted: Fri Oct 02, 2015 11:23 am
by Mark Oostveen
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?
Re: Highlight an element
Posted: Fri Oct 02, 2015 8:44 pm
by gmanucci
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
Re: Highlight an element
Posted: Fri Oct 02, 2015 10:18 pm
by Mark Oostveen
Sorry I lost you. What is this doing? How does it "highlight" an element in the graphic area of TopSolid?
Re: Highlight an element
Posted: Sat Oct 03, 2015 2:32 am
by gmanucci
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!
Re: Highlight an element
Posted: Sat Oct 03, 2015 3:35 am
by gmanucci
did u read about IUser Interface?
there you have some options like AskFace, Color, etc.
Re: Highlight an element
Posted: Wed Oct 14, 2015 11:28 am
by Mark Oostveen
no, there is none... Working with V6
Re: Highlight an element
Posted: Mon Oct 19, 2015 8:50 pm
by gmanucci
you do meaning it?
if on v6 have the GetColor and SetColor, we can do these things!
Re: Highlight an element
Posted: Wed Oct 21, 2015 7:30 am
by Mark Oostveen
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.
Re: Highlight an element
Posted: Wed Oct 21, 2015 1:46 pm
by gmanucci
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
Re: Highlight an element
Posted: Wed Oct 21, 2015 4:48 pm
by Mark Oostveen
That's TopSolid V7. I am using TopSolid'Wood which is still in V6.