Alphacam macro LocationX or LocationY property issue of text object - geometry

In Alpha-cam macro I don't see any graphical change after setting LocationX or LocationY property of a text object.
I tried to change LocationX by setting it.
text.LocationX = 400
I don't see any graphical change in the geometry.

Related

How to get the window of a visio drawing using VBA to set the zoom to fit to the window?

I am trying to make the zoom fit to window for a particular page in visio with vba.
appVisio is an variable name representing the visio application object,
appVisio.ActiveWindow.Zoom = -1
works, but I want to avoid using ActiveWindow, when I try appVisio.Windows(1) or appVisio.Window, it doesn't work becasue those two lines return a window of type visApplication, whereas the .ActiveWindow returns a window of type visDrawing, what am I doing wrong here.
Visio windows have a property called ViewFit that does what you want. You can set it to visFitPage to fit to the page, or visFitWidth to just have it fit to just the width the of the page.
appVisio.ActiveWindow.ViewFit = visFitPage

How to change render style in CATIA V5 through Excel VBA?

I wrote a macro that saves an image from CATIA, using the CaptureToFile method in the Viewer object. The macro works great, but only when the Render Style is "Parallel". Some of the designers in my company do not have the Render Style to "Parallel", so I want to change the Render Style to "Parallel" with the macro.
There is a property in the TreeTabSettingAtt object, called RenderStyle. The documentation says that the property "Returns or sets the value to signify
whether the 3D Render Style is Parallel or Perspective". It seems to be exactly what I need. To get to that property, I need to get to the TreeTabSettingAtt object, which seems to be a SettingController in the SettingControllers collection, but I can't get to it because I don't know its object type. The latter is needed to be passed as an argument of the Item method of the setting controller collection object. Unfortunately, the Item method only takes a string, which I don't know.
sub CATMain()
Dim catia as INFITF.Application
Dim att as PROCESSITF.TreeTabSettingAtt
Set catia = GetObject(, "catia.Application")
Set att = catia.SettingControllers.Item("I dont know the object type of
TreeTabSettingAtt")
att.RenderStyle "Parallel"
End Sub
In the documentation, seen in the following link, the setting controller object type of many setting controller objects are listed, but some are missing including the object type for the TreeTabSettingAtt setting controller object.
https://www.maruf.ca/files/caadoc/CAAScdInfTechArticles/CAAInfTabPageList.htm
The property you've located seems bound to the application settings (i.e. the ones you change from Tools>Options..). I don't know how good they are exposed to automation but from a quick debug session, it was evident that with
Set att = CATIA.SettingControllers
one actually gets the collection, Count property is 70 in my case, but no Item method was available! This is inconsistent with the documentation. Note that the documentation reports that the argument must be an index in long format, but passed as a string.
Answer:
I have instead located the "live setting" which is bound to the Viewpoint3D object as follows. Note that either in CATScript or CATVBA you don't need to assign the Application object (CATIA object of class Application is always available):
Set view = CATIA.ActiveWindow.ActiveViewer.Viewpoint3D
view.ProjectionMode = catProjectionCylindric
'or
view.ProjectionMode = catProjectionConic

Browser Based Application on IE a spying issue on blue prism. Element gets off screen and bp can't highlight

I am using citrix vdi to read an element on webpage. It is able to highlight and read the value in open vdi but in close vdi layout of webpage messes up and element i need went out of bound/off screen from webpage. I have tried minimize and maximize before reading value but invain. I also tried html mode and AA still cannot read it. In html mode i kept only path attribute for element, value remains exactly same on close and open vdi. The only difference i have notice is width of div in which element resides. Div width changes in open 1921and close 1203 which i assume push element out of screen bounds. Any help will be appreciated.
When working with Blue Prism don’t rely on initial attribute set. You need to choose as few attributes as possible to uniquely identify element. You should always untick attributes that are empty or it’s value it’s “Self” (for example Element ID attribute tends to have such value which doesn’t mean anything). Generally, attributes connected with elements position on the screen or its size are not helpful, because it may be easily affected.
When working with HTML spy mode your elements don’t need to be visible on screen to interact with them (unless you are using surface automation techniques), HTML elements don’t have any Visible or Screen Visible attributes.
Try to use attributes like:
Tag Name
Class Name
ID
If Value has always particular text, use wildcard type of match: text
Path attribute is not always the best choice as it might change because web page is dynamic or application update mess up the layout. If you won’t be able to identify element any other way, make sure you use Path as Dynamic match type & store it as environmental variable, so it could be easily adjusted if needed.
If you have problems reading value using “Get Current Value”, try “Get HTML Attribute” in Read stage options & try “Value” or “Title” as an Input.

Xpages - Custom property using method binding option is not showing the content

I have a custom control with around 20 custom properties. However, some of these properties need to contain code logic. This is fine, as I create the property as Type: javax.faces.el.MethodBinding and Editor: Method Binding Editor which works fine.
However, once I close the editor, click somewhere else, then click back to the custom properties of my custom control, the code has disappeared. If I look at the source code however, the logic is visible. Its a little frustrating, as whenever I want to use the editor, I need to copy my code from the source and paste back into the editor (to help with formatting, showing errors as I type etc)
Has anyone else come across this and know how to fix it, or is this just another quirk of designer?
This image shows the empty property
This image shows the property has logic in the source code

How to set content of text control in screencode

I just can't believe how hard this is.
I would like to edit the content of a Control with Type text. I'm working with lightswitch visual studio 2012. I would like to change this in the screencode (so programmatic).
I gave the control the name: "Message".
Right now, I'm trying this.FindControl("Message")., but there doesn't seem to be any property I can call to set the content. Nether can I cast the control to the correct Type text. Even Text doesn't seem to be a valid className.
Any Help on how to set the content of this control?
EDIT: Should I shoot the ControlAvailable event and try to modify content there?
You're on the right track with this.FindControl("Message"). The way to set a property on it once you have found it is as follows:
this.FindControl("Message").SetProperty("propertyToSet", [new value])
Actually, trying to set the value of a control on a screen is the wrong way to do it.
In LightSwitch, every control is bound to a property (usually an entity's property, but might also be a screen property), so setting the value of that property will update the control.
So if you have a detail screen that is bound to an entity (let's call it ClientProperty), & you have a TextBox control (let's call it MessageControl) bound to ClientProperty's Message property, all your code needs to do to change the value is:
Me.ClientProperty.Message = "This is a message"
If instead, you had a TextBox control (again, let's call it MessageControl) that's bound to a screen property (called Message), your code is as simple as:
Me.Message = "This is another message"
It seems "hard" the way you're trying to do it because it's not meant to be done that way.

Resources