cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

ACL: oid_attr(oid, attrname) - does it (should it?) return "default" values from the DTD?

MartyRoss
1-Visitor

ACL: oid_attr(oid, attrname) - does it (should it?) return "default" values from the DTD?

Does the "oid_attr(oid, attrname)" ACL function return the DTD's "default" value for an attribute if that attribute is not present on the specified "oid" tag? The "help center" entry I have (5.4 M070) for this function does not specify this behavior. An issue I'm tracking down hints that it does, but I could swear I sawpreviously that it does not do this.


In any case, I'm curious to know if this behavior is what most users of this API would want, or expect.

5 REPLIES 5


I don’t believe this will return default or fixed att values unless you have the “set writeunspecifiedattrs” set to on, then it actually writes them into the DTD.



Trust me, I’ve had this behavior cause me more than one problem. Best way I’ve found to get this value and prevent verbosity in my markup (not sure if that’s a word) is test oid_has_attr(oid, attname). If I get a zero I assume the default value per the DTD.




In Reply to Marty Ross:



Does the "oid_attr(oid, attrname)" ACL function return the DTD's "default" value for an attribute if that attribute is not present on the specified "oid" tag? The "help center" entry I have (5.4 M070) for this function does not specify this behavior. An issue I'm tracking down hints that it does, but I could swear I sawpreviously that it does not do this.


In any case, I'm curious to know if this behavior is what most users of this API would want, or expect.



Marty,


I would have to agree with Paul.


Case in point. I have an SGML DTD that has a tag with an attribute of "tmidnolen" set to "10em" as the default value. The actual entry for the attribute is: .


I opened a document, place the cursor inside <idinfo>. There are no attributes set within the document. In the command line, I enter the following command:


$m = oid_attr( oid_current_tag(), 'tmidnolen' ) ; exec mess "$m"


The return is "10em",even though it is not shown in the document.


The easiest way to tell if you have defaults set without analyzing the DTD is to open the document, position your cursor inside the tag and select Modify Attributes from the menus or Toolbar (or <ctrl+d>. Any "default value" will show up as a value in the field with the name of the attribute in BLACK. Any value you've entered into the document will have it's value shown as well, however the name of the attribute will be in BLUE.


Also mentioned by Paul, if you need to differentiate whether or not the attribute has a value set or not, use the oid_has_attr() test command. It will tell you if the OID tested has the attribute set within the document, regardless of how the attribute is defined within the DTD.


On a side note, the setting "set writeunspecifiedattrs=all" will cause the Editor to write EVERY attribute defined within the DTD out to your document (NOT the DTD). It has nothing to do with what you are trying to achieve here. Arbortext Editor is VERY aware of the DTD and it's default settings. Arbortext recommends that you do not use this setting as it will increase the size of your documents considerably. The setting is really used to save your document for use in an environment that is not completely DTD-aware.


Hope this helps,


Bob

We use WMFs produced with AutoCAD where the lines are a zero line width. It works great for our IETMs, works fine with Print Composed through Adobe Acrobat PDF print driver, but in Compose => PDF File to the PE version 5.4, the lines come out way too thin on the screen and barely dark enough in print. I’ve tried a few pdfcf changes to compression and downsizing using the various pdfcf files for example, but that only seems to affect jaggies.

Anyone with some zero line width experience that can point me in the right direction?

Printing to logbook/pocketbook sized manuals isn’t a supported page size under our Adobe drivers and they all rotate 90 degrees, so…we can’t use Print Composed like we usually do.

Current standard.pdfcf settings are as follows:


<compression type="jpeg" level="6" quality="80"></compression>


<images passthrough="" rasterize="">
<downsample targetdpi="300" threshold="600"></downsample>


[cid:image002.png@01CC4AD9.C0C24EA0]

Thanks,

John T. Jarrett
BAE Systems

Hi John,



I’m not sure if there is a bulk way to handle this via programming.



I do get a very similar complaint about eps files created by autocad. The line weights typically are too thin and light when the eps graphic is inserted into MS word for example.



My response was to use a custom line weight when plotting. When plotting choose plot device, and you should see Plot style table (pen assignments). It may default to nothing or acad.ctb. Click on new.







Select Start from scratch, click on Next.







Give it a name, click on Next.







Click on Finish







You should see My_Pens.ctb now in the dropdown field, click on Edit.







Typically, the first 10 pens are used in a drawing.







Select Color 1 and shift click on Colour 10 to select the first 10 pens. In the lineweight field, choose a value that is appropriate to the thickness of the line you are looking for.







I choose a .5mm line.







Click on Save & Close.



I click on the Plot Settings tab and I change the settings around the way I want, if you use a previous plot you’ll have to go back to the Plot Device tab and re-select your new pens. Click on Full Preview to see if your pens are going to give you the result you want.







0.5mm pens output







2 mm pens output







I typically plot to an eps file. I hope this is useful to you.



Greg








Announcements

Top Tags