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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

change line thickness for files already created

bfriesen
18-Opal

change line thickness for files already created

I need to modify the callouts (change line thickness) in our isodraw template, that I can do. How do I go about changing the illustraions that we have already done?

Bryon

9 REPLIES 9

Sounds like a macro and batch tool situation. Are your callout lines a unique size, have metadata, or another way to identify them? If so, a simple macro to change the thickness could be used with the File > Batch tool against a set of files rather quickly.

Under our pens tab we have one labeled callout if that is what you mean. all I would need to do is record a macro of me changing the line thickness on the callout pen. Then run it as a batch file against all the exsisting images.

thanks

Bryon

Ok so I am know (novice) writing my macro and hoving some trouble.

What I am trying to do is open each file in a set of folders looking for either iso or idr files. Open the file, change the callout properties. I would then like it to export to two different file types, to two different folders. Then save the file in the same spot. Then move on to the next folder and repeat.

My question are:

How do i get it to open a folder and look for specfic file types?

How do I get it to save the file with the same name?

When I export it tells me the file is not open? Does this have something to do with with the path?

Thanks for any help

Bryon

Macro change callouts 2

# recorded with Arbortext IsoDraw 7.3

Open "X:\Current Illustration Templates\Illustration templates\" "iso, idr"

Add halo "Callout Halo"

activeDoc.halos["Callout Halo"].start = 3

activeDoc.halos["Callout Halo"].end = 3

activeDoc.halos["Callout Halo"].width = 0

activeDoc.halos["Callout Halo"].color.type = "colorRef"

activeDoc.halos["Callout Halo"].color.color = "White"

activeDoc.halos["Callout Halo"].color.tone = 1

Set active pen "Callout"

activeDoc.pens["Callout"].width = 0.38

activeDoc.pens["Callout"].halo = "Callout Halo"

activeDoc.active_calloutstyle = "MacDon_Alpha"

activeDoc.callouts["MacDon_Alpha"].line_halo = "Callout Halo"

activeDoc.callouts["MacDon_Alpha"].text_gap = 2

activeDoc.active_calloutstyle = "MacDon_Numeric"

activeDoc.callouts["MacDon_Numeric"].line_halo = "Callout Halo"

activeDoc.callouts["MacDon_Numeric"].text_gap = 2

Save "X:\Current Illustration Templates\Illustration templates\

Export "X:\Photos\" "JPEG"

End Macro

Short on time, but here are answers/likely asnwers to your questions on a higher level.

1) How do i get it to open a folder and look for specfic file types?

A: Don't. You can, but it's a pain. Easier to instead use the batch tool found under File in the menu. You can then select the source and destination folder. This might also cover your conversion issue.

2) How do I get it to save the file with the same name?

A: "Save". Yup, that's it. If you just have the macro command "Save" it saves the file with it's current name. This assumes you do not rename the file somewhere prior which it appears you are not doing.

3) When I export it tells me the file is not open? Does this have something to do with with the path?

A: My strong guess...spaces. Spaces are a bad thing Windows made possible. I've banned them from our group (smaller users group). You might be able to play with quotes to get the save to work if you can't get rid of the spaces.

Thanks for the help Trevor, I will use the batch tool that is what I thought I needed to use. I could not find anywhere that it stated it saves it in the source location. This will help.

I am trying to get my test file to export to a local folder

Macro export jpeg

# recorded with Arbortext IsoDraw 7.3

Export "D:\testing\" "JPEG"

End Macro

I run the batch process, It gives me a error in the log file

Importing file: D:\test1\Template_01_3.12_X_2.25.iso

Executing macro: export jpeg

export jpg.ism export jpeg The file '%ls' is not open. "Export "d:\test2" "JPEG""

Exporting file: D:\test2\Template_01_3.12_X_2.25.iso

Time to convert file: 00:00:01.660

##################################################

I must be missing some thing simple.

Bryon

The error is caused because your export doesn't specify the file name. Two approaches. First a caution though. If you are using the batch tool, be careful on specifying your output location. It's just a good rule not to specify the source location as your destination. Now the approaches.

1) Just have the batch tool export the jpg. No need to code.

2) If you want the macro to do it, include the name. Off-hand, here is the line of code (untested).

Export "D:\testing\" + stripext(activedoc.name) + ".jpg" "JPEG"

Actually, I think it'll need to be a little longer. Try this instead.

Macro Export_jpg

Define final as string

final="D:\testing\" + stripext(activedoc.name) + ".jpg"

Export final "JPEG"

End Macro

Thanks for all the help Trevor I have finally had some time to make this all work, and it seems to work. Just one last question, I have now used the same code to export to cgm, but I need to continualy click "ok" to callouts not supported can I add a line to default "ok".

Bryon

Try placing app.interaction=false at the start of your macro and then app.interaction=true at the end.

This turns off various messages, such as these, off. Make sure and turn it back on as indicated above otherwise it will remain off throughout the current IsoDraw session.

Thank you very much for all the support.

Bryon

Announcements


Top Tags