Photoshop :: Extend-script (JS) / How To Guard Undefined Object Properties
May 31, 2012
Just picked up this Extendscript for a quick utility function. I can't seem to use any of the "usual" Javascript logic contstructs to test for undefined object properties.
Example:
typeof(app.activeDocument) === "undefined"
This is an *error* in Extendscript (Error 1302: No such element). I don't believe it should be, but if I'm supposed to do something different in Extendscript.
I recently upgraded from LT2013 to LT2014. I never had any issues with 2013, but now seem to be battling with 2014. My OS is Windows 7 Home edition.
When selecting an object and then clicking the properties menu, the properties of the selected object are not displayed, but instead the properties of the selected layer are shown.
In the attached screenshot:
1) My active layer is "AM_VIEWS".
2) The layer of the object that is selected is "MEDIUM".
3) The properties dialog box shows the properties of my active layer and not the selected object.
I am therefore unable to override any settings of the selected object and manually change settings e.g. Linetype, Linetype scale etc.
how to extend a solid object. You can see at the picture that I attached what I mean and also I will try to explain. I draw a fence 1.5 m high. At one specific part of the yard I want the fence to be 2.0 m high. So I moved upper part (horisontal) of the fence to the height of 2.0 m. Now I want the 2 vertical poles to "extend" to that height. Now I can delete those poles and use extend command from the bottom and then use silce command. I was just wondering if their is a command that I can use to grab the pole as it is now and pull it up to the new height if that is possible without erasing it.
Assume that I have an odd pyramid 3D-solid say with a polygon basis that lies on a "floor". The apex was higher than the ceiling, so I "sliced" the pyramid to fit it right under the ceiling.
Now, I change my mind and want to make the ceiling slightly higher (say, 1"): after raising the ceiling I am left with a sliced pyramid that is cut 1"below the ceiling. Question is : what is the best way to re-extend the pyramid (and make it look like it was cut by the higher ceiling) ?
I cannot just "undo" because too many things happened in the meantime.
I can imagine re-creating the unsliced pyramid by press-pulling the upper sliced surface and then slice this extension with each side of the original sliced pyramid and ultimately re-slice with the new ceiling. Can I do better / faster than that ?
Occassionally the object properties in my object manager will dissappear and I am unable to bring them back. I have tried toggling all the buttons on the manager, restarting corel, resetting corel to it's default settings and restarting my computer but nothing will bring back the properties. It does not happen on every single file but it happens often enough to be a pain. I have attached a picture of what the object manager looks like.
Every time I re-open a file containing a 3D object placed in the document, if I do a minor change (texture, color or position) the 3d object jump to his imported place in the document and lost the position and direction I placed it.
Is there something to look at to learn all the properties for CorelDraw object more than just color and shape and the like.
Is there a trick to expose all the functions of the obejct (like a curve or oval) and it's properties?
I would like to measure and identify all points on a combined curve and I was hoping for a function to identify if a curve is at or near an X Y location.
I found that it is hard for me to get the property of selected object by Javascript.
Just like the following code, I can get the object ID of each selected entity. But when I want to get the property of the DBEntity, just the center of a Circle entity, or the Position.X of a Point, I dont know how to Continue. The getExtent is the only function that I can writeout the property, it is List in the develop guide.
function setPromptSelectionOptions(options) { options.messageForAdding = " Please select some entities"
Juts had Acad LT 2009 re-installed on my new laptop, and all of my old settings, desktop preference etc have been wiped. No problem, couple of hours to set it back up.
BUT
When right-clicking on any object to bring up the properties, (line length, text height etc) the properties do not appear in the drop down box on the right, or in any 'quick properties' display
Im getting spamed by the error called Undifined Symbol XX. I found out, that the error only appears when I copy something from a different drawing. The error doesnt appear on the original plan.
I saw that I can add Fields or store data in dictionaty, but those data are not showed in Properties Windows.
In not Acad-application (but .net application) I can create property description and add "virtual" properties with the use of designer. In Aced it doesn't work.
Is it possible to add custom properties from .NET?
i want to zoom object by its properties, such as i want to zoom the object was using 0.13mm lineweights or zoom the text which was using 3mm testheight
My Acad experience is very old-school, and I have been away from true Autocad for a number of years.
I have been attempting to edit the properties of objects in the block editor and ran into a problem.
+ I select an object. + Right-click and choose Properties. + A list of properties is displayed, but they are not for the object I am trying to edit.
I did a test by selecting the object and using the command prompt, used the CHPROP command to change the objects color. It did change color as expected.
However, when I used the right-click/properties method, the properties shown do not show the new color. So, I suspect that my right-click/properties method is not showing me the object's properties. But, rather the default properties when any new objects are created.
So, obviously right-clicking is not the way to get there. What am I missing?
Is there a way to access AEC object (AEC_WALL etc.) properties from RealDWG? I am able to get the class name AecDbWall. And even the extents of the entity.There are some Aec*.dll files in the RealDWG folder but I am not sure what to use to get the properties of Wall,window.I'm using visual C++. I have installed the object enablers of Architecture Structure Drawing, MEP, and also of Civil.
I am working on a template for a project type (Residential). I have created all of my drawings, views, sheets, etc. I have a View drawing set up for a site plan - where I include some m-text regarding the survey and site plan information. I want to create fields that reference the Surveyor's Name, the Survey Date and the Project Address.
I tried creating custom properties in the project, but it appears that fields that reference the project properties only update on the sheet views in paper space. Is there a way of creating drawing specific fields in model space where I can input some data and them extract it in a field in model space that is quick and easy (as opposed to creating some type of MVB)?
I cannot change the color of any object in any drawing file from the properties manager or color command. I can change the color through the layer manager by assigning a new color to that layer, but cannot override the ByLayer and ByBlock settings with the object properties. The color drop down is simply grayed out. I am using Autocad lt 2006.
When selecting an AEC and going to the properties dialogue box I no longer have items showing up in the prpoerties like cleanup group, size, or endpoint type. It only has the general tab and 3d visualization. I did a repair from the uninstall software fromn control panel. I also rebooted. I don't want to do a reinstall becuase of customizations. I have vista Ultimate operating system.
When I pick the properties command sometimes the box comes up blank and the "Esc" key has to be pressed to bring up the box. When the box does come up the properties of a picked object does show and you cannot change the properties of the picked object. I am runnung AutoCadLT 2014.
I am using AutoCAD LT 2014. Whenever I open a drawing, I receive the error message, ** Undefined shape XX with XX representing different numbers (50, 120, and 53). According to the KB, This error message is typically displayed when a required font style is not available for use. The solution is to copy the fonts from another computer but my issue is, I don't have another computer with the working fonts.
Additionally, I am unable to enter any text into the drawing using the Single line or Multiline tool. From MTEXT, whenever I enter any letters, I receive the same error message ** Undefined shape XXX.
My support file search contains links to all of the necessary files